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

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

Issue 1984863002: Clean up LoginUIService. Remove Singleton behavior from PeopleHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix merge issue Created 4 years, 6 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 <memory> 7 #include <memory>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 29 matching lines...) Expand all
40 public: 40 public:
41 FakeLoginUI() : focus_ui_call_count_(0) {} 41 FakeLoginUI() : focus_ui_call_count_(0) {}
42 42
43 ~FakeLoginUI() override {} 43 ~FakeLoginUI() override {}
44 44
45 int focus_ui_call_count() const { return focus_ui_call_count_; } 45 int focus_ui_call_count() const { return focus_ui_call_count_; }
46 46
47 private: 47 private:
48 // Overridden from LoginUIService::LoginUI: 48 // Overridden from LoginUIService::LoginUI:
49 void FocusUI() override { ++focus_ui_call_count_; } 49 void FocusUI() override { ++focus_ui_call_count_; }
50 void CloseUI() override {}
51 50
52 int focus_ui_call_count_; 51 int focus_ui_call_count_;
53 }; 52 };
54 53
55 std::unique_ptr<KeyedService> BuildMockLoginUIService( 54 std::unique_ptr<KeyedService> BuildMockLoginUIService(
56 content::BrowserContext* profile) { 55 content::BrowserContext* profile) {
57 return base::WrapUnique(new FakeLoginUIService()); 56 return base::WrapUnique(new FakeLoginUIService());
58 } 57 }
59 58
60 // Same as BrowserWithTestWindowTest, but uses MockBrowser to test calls to 59 // Same as BrowserWithTestWindowTest, but uses MockBrowser to test calls to
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 .WillRepeatedly(Return(true)); 165 .WillRepeatedly(Return(true));
167 EXPECT_CALL(service, IsPassphraseRequiredForDecryption()) 166 EXPECT_CALL(service, IsPassphraseRequiredForDecryption())
168 .WillRepeatedly(Return(true)); 167 .WillRepeatedly(Return(true));
169 VerifySyncGlobalErrorResult( 168 VerifySyncGlobalErrorResult(
170 &service, login_ui_service, browser(), &error, &global_error, 169 &service, login_ui_service, browser(), &error, &global_error,
171 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, 170 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS,
172 false /* not signed in */, false /* no error */); 171 false /* not signed in */, false /* no error */);
173 172
174 global_error.Shutdown(); 173 global_error.Shutdown();
175 } 174 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_error_notifier_ash_unittest.cc ('k') | chrome/browser/ui/sync/one_click_signin_sync_starter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698