Skip to content
Snippets Groups Projects
Commit 2fdc86af authored by erg@google.com's avatar erg@google.com
Browse files

Style cleanup in preparation for auto-linting base/.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/552004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37164 0039d316-1c4b-4281-b951-d872f2087c98
parent 7e7a62b4
No related merge requests found
......@@ -85,7 +85,7 @@ class BaseTimer_Helper {
// We have access to the timer_ member so we can orphan this task.
class TimerTask : public Task {
public:
TimerTask(TimeDelta delay) : timer_(NULL), delay_(delay) {
explicit TimerTask(TimeDelta delay) : timer_(NULL), delay_(delay) {
}
virtual ~TimerTask() {}
BaseTimer_Helper* timer_;
......
......@@ -34,7 +34,7 @@ class OneShotTimerTester {
class OneShotSelfDeletingTimerTester {
public:
OneShotSelfDeletingTimerTester(bool* did_run) :
explicit OneShotSelfDeletingTimerTester(bool* did_run) :
did_run_(did_run),
timer_(new base::OneShotTimer<OneShotSelfDeletingTimerTester>()) {
}
......@@ -54,8 +54,10 @@ class OneShotSelfDeletingTimerTester {
class RepeatingTimerTester {
public:
RepeatingTimerTester(bool* did_run) : did_run_(did_run), counter_(10) {
explicit RepeatingTimerTester(bool* did_run)
: did_run_(did_run), counter_(10) {
}
void Start() {
timer_.Start(TimeDelta::FromMilliseconds(10), this,
&RepeatingTimerTester::Run);
......
......@@ -130,4 +130,4 @@ class TraceLog {
} // namespace base
#endif // BASE_TRACE_EVENT_H_
#endif // BASE_TRACE_EVENT_H_
......@@ -171,7 +171,7 @@ struct Tuple4 {
template <class A, class B, class C, class D, class E>
struct Tuple5 {
public:
public:
typedef A TypeA;
typedef B TypeB;
typedef C TypeC;
......@@ -211,7 +211,7 @@ public:
template <class A, class B, class C, class D, class E, class F>
struct Tuple6 {
public:
public:
typedef A TypeA;
typedef B TypeB;
typedef C TypeC;
......@@ -257,7 +257,7 @@ public:
template <class A, class B, class C, class D, class E, class F, class G>
struct Tuple7 {
public:
public:
typedef A TypeA;
typedef B TypeB;
typedef C TypeC;
......@@ -609,9 +609,8 @@ inline void DispatchToMethod(ObjT* obj, Method method,
(obj->*method)(in.a, in.b, in.c, in.d, &out->a);
}
template<class ObjT, class Method,
class InA, class InB, class InC, class InD, class InE,
class OutA>
template<class ObjT, class Method, class InA, class InB, class InC, class InD,
class InE, class OutA>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple5<InA, InB, InC, InD, InE>& in,
Tuple1<OutA>* out) {
......
......@@ -315,7 +315,10 @@ class DictionaryValue : public Value {
: private std::iterator<std::input_iterator_tag, const std::wstring> {
public:
explicit key_iterator(ValueMap::const_iterator itr) { itr_ = itr; }
key_iterator operator++() { ++itr_; return *this; }
key_iterator operator++() {
++itr_;
return *this;
}
const std::wstring& operator*() { return itr_->first; }
bool operator!=(const key_iterator& other) { return itr_ != other.itr_; }
bool operator==(const key_iterator& other) { return itr_ == other.itr_; }
......
......@@ -169,7 +169,7 @@ TEST(ValuesTest, StringValue) {
// properly deleted by modifying the value of external flag on destruction.
class DeletionTestValue : public Value {
public:
DeletionTestValue(bool* deletion_flag) : Value(TYPE_NULL) {
explicit DeletionTestValue(bool* deletion_flag) : Value(TYPE_NULL) {
Init(deletion_flag); // Separate function so that we can use ASSERT_*
}
......
......@@ -11,7 +11,7 @@
#include "base/basictypes.h"
class Version {
public:
public:
// The version string must be made up of 1 or more uint16's separated
// by '.'. Returns NULL if string is not in this format.
// Caller is responsible for freeing the Version object once done.
......@@ -30,7 +30,7 @@ public:
const std::vector<uint16>& components() const { return components_; }
private:
private:
Version() {}
bool InitFromString(const std::string& version_str);
......
......@@ -22,7 +22,7 @@ class QuitDelegate : public WaitableEventWatcher::Delegate {
class DecrementCountDelegate : public WaitableEventWatcher::Delegate {
public:
DecrementCountDelegate(int* counter) : counter_(counter) {
explicit DecrementCountDelegate(int* counter) : counter_(counter) {
}
virtual void OnWaitableEventSignaled(WaitableEvent* object) {
--(*counter_);
......
......@@ -16,7 +16,7 @@ namespace {
class PostTaskTestTask : public Task {
public:
PostTaskTestTask(WaitableEvent* event) : event_(event) {
explicit PostTaskTestTask(WaitableEvent* event) : event_(event) {
}
void Run() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment