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

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

Issue 115393004: Turn on inline signin by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years 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 | Annotate | Revision Log
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_HELPER_H_ 5 #ifndef CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_
6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ 6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperTest, 169 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperTest,
170 RemoveObserverFromProfileSyncService); 170 RemoveObserverFromProfileSyncService);
171 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, CanOfferOnIOThread); 171 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, CanOfferOnIOThread);
172 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, 172 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
173 CanOfferOnIOThreadIncognito); 173 CanOfferOnIOThreadIncognito);
174 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, 174 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
175 CanOfferOnIOThreadNoIOData); 175 CanOfferOnIOThreadNoIOData);
176 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, 176 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
177 CanOfferOnIOThreadBadURL); 177 CanOfferOnIOThreadBadURL);
178 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, 178 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
179 CanOfferOnIOThreadReferrer);
180 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
181 CanOfferOnIOThreadDisabled); 179 CanOfferOnIOThreadDisabled);
182 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, 180 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
183 CanOfferOnIOThreadSignedIn); 181 CanOfferOnIOThreadSignedIn);
184 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, 182 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
185 CanOfferOnIOThreadEmailNotAllowed); 183 CanOfferOnIOThreadEmailNotAllowed);
186 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, 184 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
187 CanOfferOnIOThreadEmailAlreadyUsed); 185 CanOfferOnIOThreadEmailAlreadyUsed);
188 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, 186 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
189 CreateTestProfileIOData); 187 CreateTestProfileIOData);
190 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, 188 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
(...skipping 11 matching lines...) Expand all
202 OneClickSigninHelper(content::WebContents* web_contents, 200 OneClickSigninHelper(content::WebContents* web_contents,
203 PasswordManager* password_manager); 201 PasswordManager* password_manager);
204 202
205 virtual ~OneClickSigninHelper(); 203 virtual ~OneClickSigninHelper();
206 204
207 // Returns true if the one-click signin feature can be offered at this time. 205 // Returns true if the one-click signin feature can be offered at this time.
208 // It can be offered if the io_data is not in an incognito window and if the 206 // It can be offered if the io_data is not in an incognito window and if the
209 // origin of |url| is a valid Gaia sign in origin. This function is meant 207 // origin of |url| is a valid Gaia sign in origin. This function is meant
210 // to called only from the IO thread. 208 // to called only from the IO thread.
211 static Offer CanOfferOnIOThreadImpl(const GURL& url, 209 static Offer CanOfferOnIOThreadImpl(const GURL& url,
212 const std::string& referrer,
213 base::SupportsUserData* request, 210 base::SupportsUserData* request,
214 ProfileIOData* io_data); 211 ProfileIOData* io_data);
215 212
216 // The portion of ShowInfoBarIfPossible() that needs to run on the UI thread. 213 // The portion of ShowInfoBarIfPossible() that needs to run on the UI thread.
217 // |session_index| and |email| are extracted from the Google-Accounts-SignIn 214 // |session_index| and |email| are extracted from the Google-Accounts-SignIn
218 // header. |auto_accept| is extracted from the Google-Chrome-SignIn header. 215 // header. |auto_accept| is extracted from the Google-Chrome-SignIn header.
219 // |source| is used to determine which of the explicit sign in mechanism is 216 // |source| is used to determine which of the explicit sign in mechanism is
220 // being used. 217 // being used.
221 // 218 //
222 // |continue_url| is where Gaia will continue to when the sign in process is 219 // |continue_url| is where Gaia will continue to when the sign in process is
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 302
306 // Allows unittest to avoid starting sync for real. 303 // Allows unittest to avoid starting sync for real.
307 bool do_not_start_sync_for_testing_; 304 bool do_not_start_sync_for_testing_;
308 305
309 base::WeakPtrFactory<OneClickSigninHelper> weak_pointer_factory_; 306 base::WeakPtrFactory<OneClickSigninHelper> weak_pointer_factory_;
310 307
311 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); 308 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper);
312 }; 309 };
313 310
314 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ 311 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698