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

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

Issue 14029006: Properly handle user cancellation of signin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 private: 116 private:
117 explicit OneClickSigninHelper(content::WebContents* web_contents); 117 explicit OneClickSigninHelper(content::WebContents* web_contents);
118 friend class content::WebContentsUserData<OneClickSigninHelper>; 118 friend class content::WebContentsUserData<OneClickSigninHelper>;
119 friend class OneClickSigninHelperTest; 119 friend class OneClickSigninHelperTest;
120 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperTest, 120 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperTest,
121 ShowInfoBarUIThreadIncognito); 121 ShowInfoBarUIThreadIncognito);
122 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperTest, 122 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperTest,
123 SigninFromWebstoreWithConfigSyncfirst); 123 SigninFromWebstoreWithConfigSyncfirst);
124 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperTest, 124 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperTest,
125 ShowSigninBubbleAfterSigninComplete); 125 ShowSigninBubbleAfterSigninComplete);
126 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperTest, SigninCancelled);
127 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperTest, SigninFailed);
126 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, CanOfferOnIOThread); 128 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, CanOfferOnIOThread);
127 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, 129 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
128 CanOfferOnIOThreadIncognito); 130 CanOfferOnIOThreadIncognito);
129 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, 131 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
130 CanOfferOnIOThreadNoIOData); 132 CanOfferOnIOThreadNoIOData);
131 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, 133 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
132 CanOfferOnIOThreadBadURL); 134 CanOfferOnIOThreadBadURL);
133 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, 135 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
134 CanOfferOnIOThreadReferrer); 136 CanOfferOnIOThreadReferrer);
135 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest, 137 FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 static void ShowInfoBarUIThread(const std::string& session_index, 174 static void ShowInfoBarUIThread(const std::string& session_index,
173 const std::string& email, 175 const std::string& email,
174 AutoAccept auto_accept, 176 AutoAccept auto_accept,
175 SyncPromoUI::Source source, 177 SyncPromoUI::Source source,
176 const GURL& continue_url, 178 const GURL& continue_url,
177 int child_id, 179 int child_id,
178 int route_id); 180 int route_id);
179 181
180 void RedirectToNtpOrAppsPage(bool show_bubble); 182 void RedirectToNtpOrAppsPage(bool show_bubble);
181 void RedirectToSignin(); 183 void RedirectToSignin();
182 void RedirectOnSigninComplete(); 184 void RedirectOnSigninComplete(bool show_bubble);
183 185
184 // Clear all data member of the helper, except for the error. 186 // Clear all data member of the helper, except for the error.
185 void CleanTransientState(); 187 void CleanTransientState();
186 188
187 // Grab Gaia password if available. 189 // Grab Gaia password if available.
188 bool OnFormSubmitted(const content::PasswordForm& form); 190 bool OnFormSubmitted(const content::PasswordForm& form);
189 191
190 // content::WebContentsObserver overrides. 192 // content::WebContentsObserver overrides.
191 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 193 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
192 virtual void NavigateToPendingEntry( 194 virtual void NavigateToPendingEntry(
(...skipping 28 matching lines...) Expand all
221 GURL continue_url_; 223 GURL continue_url_;
222 // Redirect URL after sync setup is complete. 224 // Redirect URL after sync setup is complete.
223 GURL redirect_url_; 225 GURL redirect_url_;
224 std::string error_message_; 226 std::string error_message_;
225 scoped_ptr<SigninTracker> signin_tracker_; 227 scoped_ptr<SigninTracker> signin_tracker_;
226 228
227 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); 229 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper);
228 }; 230 };
229 231
230 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ 232 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_manager_unittest.cc ('k') | chrome/browser/ui/sync/one_click_signin_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698