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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_sync_starter.h

Issue 2800683008: Sync confirmation: change "Settings" link to checkbox (Closed)
Patch Set: tests Created 3 years, 8 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 #ifndef CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ 5 #ifndef CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_
6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ 6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 Callback callback); 125 Callback callback);
126 126
127 // chrome::BrowserListObserver override. 127 // chrome::BrowserListObserver override.
128 void OnBrowserRemoved(Browser* browser) override; 128 void OnBrowserRemoved(Browser* browser) override;
129 129
130 // If the |browser| argument is non-null, returns the pointer directly. 130 // If the |browser| argument is non-null, returns the pointer directly.
131 // Otherwise creates a new browser for the given profile on the given 131 // Otherwise creates a new browser for the given profile on the given
132 // desktop, adds an empty tab and makes sure the browser is visible. 132 // desktop, adds an empty tab and makes sure the browser is visible.
133 static Browser* EnsureBrowser(Browser* browser, Profile* profile); 133 static Browser* EnsureBrowser(Browser* browser, Profile* profile);
134 134
135 protected:
136 ~OneClickSigninSyncStarter() override;
137
138 // Overridden from tests.
139 virtual void ShowSyncSetupSettingsSubpage();
140
135 private: 141 private:
136 friend class OneClickSigninSyncStarterTest; 142 friend class OneClickSigninSyncStarterTest;
137 FRIEND_TEST_ALL_PREFIXES(OneClickSigninSyncStarterTest, CallbackSigninFailed); 143 FRIEND_TEST_ALL_PREFIXES(OneClickSigninSyncStarterTest, CallbackSigninFailed);
138 FRIEND_TEST_ALL_PREFIXES(OneClickSigninSyncStarterTest, CallbackNull); 144 FRIEND_TEST_ALL_PREFIXES(OneClickSigninSyncStarterTest, CallbackNull);
139 FRIEND_TEST_ALL_PREFIXES(OneClickSigninSyncStarterTest, LoadContinueUrl); 145 FRIEND_TEST_ALL_PREFIXES(OneClickSigninSyncStarterTest, LoadContinueUrl);
140 146
141 ~OneClickSigninSyncStarter() override;
142
143 // Initializes the internals of the OneClickSigninSyncStarter object. Can also 147 // Initializes the internals of the OneClickSigninSyncStarter object. Can also
144 // be used to re-initialize the object to refer to a newly created profile. 148 // be used to re-initialize the object to refer to a newly created profile.
145 void Initialize(Profile* profile, Browser* browser); 149 void Initialize(Profile* profile, Browser* browser);
146 150
147 // SigninTracker::Observer override. 151 // SigninTracker::Observer override.
148 void SigninFailed(const GoogleServiceAuthError& error) override; 152 void SigninFailed(const GoogleServiceAuthError& error) override;
149 void SigninSuccess() override; 153 void SigninSuccess() override;
150 void AccountAddedToCookie(const GoogleServiceAuthError& error) override; 154 void AccountAddedToCookie(const GoogleServiceAuthError& error) override;
151 155
152 // LoginUIService::Observer override. 156 // LoginUIService::Observer override.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // Prevents Sync from running until configuration is complete. 264 // Prevents Sync from running until configuration is complete.
261 std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_; 265 std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_;
262 266
263 base::WeakPtrFactory<OneClickSigninSyncStarter> weak_pointer_factory_; 267 base::WeakPtrFactory<OneClickSigninSyncStarter> weak_pointer_factory_;
264 268
265 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter); 269 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter);
266 }; 270 };
267 271
268 272
269 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ 273 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698