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

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

Issue 11938007: Don't use request user data during one-click sign in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 }; 66 };
67 67
68 // Argument to CanOffer(). 68 // Argument to CanOffer().
69 enum CanOfferFor { 69 enum CanOfferFor {
70 CAN_OFFER_FOR_ALL, 70 CAN_OFFER_FOR_ALL,
71 CAN_OFFER_FOR_INTERSTITAL_ONLY 71 CAN_OFFER_FOR_INTERSTITAL_ONLY
72 }; 72 };
73 73
74 virtual ~OneClickSigninHelper(); 74 virtual ~OneClickSigninHelper();
75 75
76 // Called only by tests to associate information with a given request.
77 static void AssociateWithRequestForTesting(base::SupportsUserData* request,
78 const std::string& email);
79
80 // Returns true if the one-click signin feature can be offered at this time. 76 // Returns true if the one-click signin feature can be offered at this time.
81 // If |email| is not empty, then the profile is checked to see if it's 77 // If |email| is not empty, then the profile is checked to see if it's
82 // already connected to a google account or if the user has already rejected 78 // already connected to a google account or if the user has already rejected
83 // one-click sign-in with this email, in which cases a one click signin 79 // one-click sign-in with this email, in which cases a one click signin
84 // should not be offered. 80 // should not be offered.
85 // 81 //
86 // If |can_offer_for| is |CAN_OFFER_FOR_INTERSTITAL_ONLY|, then only do the 82 // If |can_offer_for| is |CAN_OFFER_FOR_INTERSTITAL_ONLY|, then only do the
87 // checks that would affect the interstitial page. Otherwise, do the checks 83 // checks that would affect the interstitial page. Otherwise, do the checks
88 // that would affect the interstitial and the explicit sign ins. 84 // that would affect the interstitial and the explicit sign ins.
89 // 85 //
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 SyncPromoUI::Source source_; 193 SyncPromoUI::Source source_;
198 GURL continue_url_; 194 GURL continue_url_;
199 std::string error_message_; 195 std::string error_message_;
200 196
201 scoped_ptr<SigninTracker> signin_tracker_; 197 scoped_ptr<SigninTracker> signin_tracker_;
202 198
203 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); 199 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper);
204 }; 200 };
205 201
206 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ 202 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698