OLD | NEW |
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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 static void ShowInfoBarIfPossible(net::URLRequest* request, | 207 static void ShowInfoBarIfPossible(net::URLRequest* request, |
208 ProfileIOData* io_data, | 208 ProfileIOData* io_data, |
209 int child_id, | 209 int child_id, |
210 int route_id); | 210 int route_id); |
211 | 211 |
212 // Handles cross account sign in error. If the supplied |email| does not match | 212 // Handles cross account sign in error. If the supplied |email| does not match |
213 // the last signed in email of the current profile, then Chrome will show a | 213 // the last signed in email of the current profile, then Chrome will show a |
214 // confirmation dialog before starting sync. It returns true if there is a | 214 // confirmation dialog before starting sync. It returns true if there is a |
215 // cross account error, and false otherwise. | 215 // cross account error, and false otherwise. |
216 static bool HandleCrossAccountError( | 216 static bool HandleCrossAccountError( |
217 content::WebContents* contents, | 217 Profile* profile, |
218 const std::string& session_index, | 218 const std::string& session_index, |
219 const std::string& email, | 219 const std::string& email, |
220 const std::string& password, | 220 const std::string& password, |
221 const std::string& refresh_token, | 221 const std::string& refresh_token, |
222 OneClickSigninHelper::AutoAccept auto_accept, | 222 OneClickSigninHelper::AutoAccept auto_accept, |
223 signin::Source source, | 223 signin::Source source, |
224 OneClickSigninSyncStarter::StartSyncMode start_mode, | 224 OneClickSigninSyncStarter::StartSyncMode start_mode, |
225 OneClickSigninSyncStarter::Callback sync_callback); | 225 OneClickSigninSyncStarter::Callback sync_callback); |
226 | 226 |
227 static void RedirectToNtpOrAppsPage( | 227 static void RedirectToNtpOrAppsPage( |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 | 385 |
386 // Allows unittest to avoid starting sync for real. | 386 // Allows unittest to avoid starting sync for real. |
387 bool do_not_start_sync_for_testing_; | 387 bool do_not_start_sync_for_testing_; |
388 | 388 |
389 base::WeakPtrFactory<OneClickSigninHelper> weak_pointer_factory_; | 389 base::WeakPtrFactory<OneClickSigninHelper> weak_pointer_factory_; |
390 | 390 |
391 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); | 391 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); |
392 }; | 392 }; |
393 | 393 |
394 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ | 394 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ |
OLD | NEW |