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

Side by Side Diff: chrome/browser/sync/sync_global_error_unittest.cc

Issue 666733003: Standardize usage of virtual/override/final in chrome/browser/sync/ (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/sync/sync_global_error.h" 5 #include "chrome/browser/sync/sync_global_error.h"
6 6
7 #include "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/sync/profile_sync_service_mock.h" 8 #include "chrome/browser/sync/profile_sync_service_mock.h"
9 #include "chrome/browser/sync/sync_error_controller.h" 9 #include "chrome/browser/sync/sync_error_controller.h"
10 #include "chrome/browser/sync/sync_global_error_factory.h" 10 #include "chrome/browser/sync/sync_global_error_factory.h"
(...skipping 17 matching lines...) Expand all
28 28
29 class FakeLoginUIService: public LoginUIService { 29 class FakeLoginUIService: public LoginUIService {
30 public: 30 public:
31 FakeLoginUIService() : LoginUIService(NULL) {} 31 FakeLoginUIService() : LoginUIService(NULL) {}
32 }; 32 };
33 33
34 class FakeLoginUI : public LoginUIService::LoginUI { 34 class FakeLoginUI : public LoginUIService::LoginUI {
35 public: 35 public:
36 FakeLoginUI() : focus_ui_call_count_(0) {} 36 FakeLoginUI() : focus_ui_call_count_(0) {}
37 37
38 virtual ~FakeLoginUI() {} 38 ~FakeLoginUI() override {}
39 39
40 int focus_ui_call_count() const { return focus_ui_call_count_; } 40 int focus_ui_call_count() const { return focus_ui_call_count_; }
41 41
42 private: 42 private:
43 // Overridden from LoginUIService::LoginUI: 43 // Overridden from LoginUIService::LoginUI:
44 virtual void FocusUI() override { 44 void FocusUI() override { ++focus_ui_call_count_; }
45 ++focus_ui_call_count_; 45 void CloseUI() override {}
46 }
47 virtual void CloseUI() override {}
48 46
49 int focus_ui_call_count_; 47 int focus_ui_call_count_;
50 }; 48 };
51 49
52 KeyedService* BuildMockLoginUIService(content::BrowserContext* profile) { 50 KeyedService* BuildMockLoginUIService(content::BrowserContext* profile) {
53 return new FakeLoginUIService(); 51 return new FakeLoginUIService();
54 } 52 }
55 53
56 // Same as BrowserWithTestWindowTest, but uses MockBrowser to test calls to 54 // Same as BrowserWithTestWindowTest, but uses MockBrowser to test calls to
57 // ExecuteCommand method. 55 // ExecuteCommand method.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 .WillRepeatedly(Return(true)); 157 .WillRepeatedly(Return(true));
160 EXPECT_CALL(service, IsPassphraseRequiredForDecryption()) 158 EXPECT_CALL(service, IsPassphraseRequiredForDecryption())
161 .WillRepeatedly(Return(true)); 159 .WillRepeatedly(Return(true));
162 VerifySyncGlobalErrorResult( 160 VerifySyncGlobalErrorResult(
163 &service, login_ui_service, browser(), &error, &global_error, 161 &service, login_ui_service, browser(), &error, &global_error,
164 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, 162 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS,
165 false /* not signed in */, false /* no error */); 163 false /* not signed in */, false /* no error */);
166 164
167 global_error.Shutdown(); 165 global_error.Shutdown();
168 } 166 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_global_error_factory.h ('k') | chrome/browser/sync/sync_policy_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698