Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: chrome/browser/extensions/api/idle/idle_api_unittest.cc

Issue 624153002: replace OVERRIDE and FINAL with override and final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/idle/idle_api.h" 5 #include "chrome/browser/extensions/api/idle/idle_api.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 26 matching lines...) Expand all
37 MOCK_METHOD2(OnStateChanged, void(const std::string&, IdleState)); 37 MOCK_METHOD2(OnStateChanged, void(const std::string&, IdleState));
38 virtual void RegisterObserver(EventRouter::Observer* observer) {} 38 virtual void RegisterObserver(EventRouter::Observer* observer) {}
39 virtual void UnregisterObserver(EventRouter::Observer* observer) {} 39 virtual void UnregisterObserver(EventRouter::Observer* observer) {}
40 }; 40 };
41 41
42 class TestIdleProvider : public IdleManager::IdleTimeProvider { 42 class TestIdleProvider : public IdleManager::IdleTimeProvider {
43 public: 43 public:
44 TestIdleProvider(); 44 TestIdleProvider();
45 virtual ~TestIdleProvider(); 45 virtual ~TestIdleProvider();
46 virtual void CalculateIdleState(int idle_threshold, 46 virtual void CalculateIdleState(int idle_threshold,
47 IdleCallback notify) OVERRIDE; 47 IdleCallback notify) override;
48 virtual void CalculateIdleTime(IdleTimeCallback notify) OVERRIDE; 48 virtual void CalculateIdleTime(IdleTimeCallback notify) override;
49 virtual bool CheckIdleStateIsLocked() OVERRIDE; 49 virtual bool CheckIdleStateIsLocked() override;
50 50
51 void set_idle_time(int idle_time); 51 void set_idle_time(int idle_time);
52 void set_locked(bool locked); 52 void set_locked(bool locked);
53 53
54 private: 54 private:
55 int idle_time_; 55 int idle_time_;
56 bool locked_; 56 bool locked_;
57 }; 57 };
58 58
59 TestIdleProvider::TestIdleProvider() 59 TestIdleProvider::TestIdleProvider()
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 120
121 KeyedService* IdleManagerTestFactory(content::BrowserContext* profile) { 121 KeyedService* IdleManagerTestFactory(content::BrowserContext* profile) {
122 return new IdleManager(static_cast<Profile*>(profile)); 122 return new IdleManager(static_cast<Profile*>(profile));
123 } 123 }
124 124
125 } // namespace 125 } // namespace
126 126
127 class IdleTest : public ExtensionApiUnittest { 127 class IdleTest : public ExtensionApiUnittest {
128 public: 128 public:
129 virtual void SetUp() OVERRIDE; 129 virtual void SetUp() override;
130 130
131 protected: 131 protected:
132 IdleManager* idle_manager_; 132 IdleManager* idle_manager_;
133 TestIdleProvider* idle_provider_; 133 TestIdleProvider* idle_provider_;
134 testing::StrictMock<MockEventDelegate>* event_delegate_; 134 testing::StrictMock<MockEventDelegate>* event_delegate_;
135 }; 135 };
136 136
137 void IdleTest::SetUp() { 137 void IdleTest::SetUp() {
138 ExtensionApiUnittest::SetUp(); 138 ExtensionApiUnittest::SetUp();
139 139
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 560
561 { 561 {
562 // Nothing should have fired, the listener wasn't added until afterward. 562 // Nothing should have fired, the listener wasn't added until afterward.
563 ScopedListen listen(idle_manager_, "test"); 563 ScopedListen listen(idle_manager_, "test");
564 idle_manager_->UpdateIdleState(); 564 idle_manager_->UpdateIdleState();
565 testing::Mock::VerifyAndClearExpectations(event_delegate_); 565 testing::Mock::VerifyAndClearExpectations(event_delegate_);
566 } 566 }
567 } 567 }
568 568
569 } // namespace extensions 569 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/idle/idle_api.h ('k') | chrome/browser/extensions/api/idle/idle_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698