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

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

Issue 99913004: Add error handling to inline signin flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 ProfileIOData* io_data); 113 ProfileIOData* io_data);
114 114
115 // Looks for the Google-Accounts-SignIn response header, and if found, 115 // Looks for the Google-Accounts-SignIn response header, and if found,
116 // tries to display an infobar in the tab contents identified by the 116 // tries to display an infobar in the tab contents identified by the
117 // child/route id. 117 // child/route id.
118 static void ShowInfoBarIfPossible(net::URLRequest* request, 118 static void ShowInfoBarIfPossible(net::URLRequest* request,
119 ProfileIOData* io_data, 119 ProfileIOData* io_data,
120 int child_id, 120 int child_id,
121 int route_id); 121 int route_id);
122 122
123 static void ShowSigninErrorBubble(Browser* browser, const std::string& error);
124
123 // Remove the item currently at the top of the history list if it's 125 // Remove the item currently at the top of the history list if it's
124 // the Gaia redirect URL. Due to limitations of the NavigationController 126 // the Gaia redirect URL. Due to limitations of the NavigationController
125 // this cannot be done until a new page becomes "current". 127 // this cannot be done until a new page becomes "current".
126 static void RemoveSigninRedirectURLHistoryItem( 128 static void RemoveSigninRedirectURLHistoryItem(
127 content::WebContents* web_contents); 129 content::WebContents* web_contents);
128 130
129 static void LogConfirmHistogramValue(int action); 131 static void LogConfirmHistogramValue(int action);
130 132
131 private: 133 private:
132 friend class content::WebContentsUserData<OneClickSigninHelper>; 134 friend class content::WebContentsUserData<OneClickSigninHelper>;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // entered on the Gaia sign in page (for explicit sign ins). 203 // entered on the Gaia sign in page (for explicit sign ins).
202 static void ShowInfoBarUIThread(const std::string& session_index, 204 static void ShowInfoBarUIThread(const std::string& session_index,
203 const std::string& email, 205 const std::string& email,
204 AutoAccept auto_accept, 206 AutoAccept auto_accept,
205 signin::Source source, 207 signin::Source source,
206 const GURL& continue_url, 208 const GURL& continue_url,
207 int child_id, 209 int child_id,
208 int route_id); 210 int route_id);
209 211
210 void RedirectToSignin(); 212 void RedirectToSignin();
211 void ShowSigninErrorBubble(Browser* browser, const std::string& error);
212 213
213 // Clear all data member of the helper, except for the error. 214 // Clear all data member of the helper, except for the error.
214 void CleanTransientState(); 215 void CleanTransientState();
215 216
216 // Unitests that use a TestingProfile should call this. 217 // Unitests that use a TestingProfile should call this.
217 // Otherwise, clearing the pending e-mail crashes because the code expects 218 // Otherwise, clearing the pending e-mail crashes because the code expects
218 // a real ResourceContext rather than the MockResourceContext a 219 // a real ResourceContext rather than the MockResourceContext a
219 // TestingProfile provides. 220 // TestingProfile provides.
220 void SetDoNotClearPendingEmailForTesting(); 221 void SetDoNotClearPendingEmailForTesting();
221 222
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 282
282 // Allows unittest to avoid starting sync for real. 283 // Allows unittest to avoid starting sync for real.
283 bool do_not_start_sync_for_testing_; 284 bool do_not_start_sync_for_testing_;
284 285
285 base::WeakPtrFactory<OneClickSigninHelper> weak_pointer_factory_; 286 base::WeakPtrFactory<OneClickSigninHelper> weak_pointer_factory_;
286 287
287 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); 288 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper);
288 }; 289 };
289 290
290 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ 291 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/sync/one_click_signin_helper.cc » ('j') | chrome/browser/ui/webui/inline_login_ui.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698