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

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

Issue 362613002: Implementation of SigninClient::GetSigninScopedDeviceId (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes after feedback from Roger. Created 6 years, 5 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
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 struct StartSyncArgs { 93 struct StartSyncArgs {
94 // Default contructor for testing only. 94 // Default contructor for testing only.
95 StartSyncArgs(); 95 StartSyncArgs();
96 StartSyncArgs(Profile* profile, 96 StartSyncArgs(Profile* profile,
97 Browser* browser, 97 Browser* browser,
98 OneClickSigninHelper::AutoAccept auto_accept, 98 OneClickSigninHelper::AutoAccept auto_accept,
99 const std::string& session_index, 99 const std::string& session_index,
100 const std::string& email, 100 const std::string& email,
101 const std::string& password, 101 const std::string& password,
102 const std::string& refresh_token, 102 const std::string& refresh_token,
103 const std::string& signin_scoped_device_id,
104 content::WebContents* web_contents, 103 content::WebContents* web_contents,
105 bool untrusted_confirmation_required, 104 bool untrusted_confirmation_required,
106 signin::Source source, 105 signin::Source source,
107 OneClickSigninSyncStarter::Callback callback); 106 OneClickSigninSyncStarter::Callback callback);
108 ~StartSyncArgs(); 107 ~StartSyncArgs();
109 108
110 Profile* profile; 109 Profile* profile;
111 Browser* browser; 110 Browser* browser;
112 OneClickSigninHelper::AutoAccept auto_accept; 111 OneClickSigninHelper::AutoAccept auto_accept;
113 std::string session_index; 112 std::string session_index;
114 std::string email; 113 std::string email;
115 std::string password; 114 std::string password;
116 std::string refresh_token; 115 std::string refresh_token;
117 std::string signin_scoped_device_id;
118 116
119 // Web contents in which the sync setup page should be displayed, 117 // Web contents in which the sync setup page should be displayed,
120 // if necessary. Can be NULL. 118 // if necessary. Can be NULL.
121 content::WebContents* web_contents; 119 content::WebContents* web_contents;
122 120
123 OneClickSigninSyncStarter::ConfirmationRequired confirmation_required; 121 OneClickSigninSyncStarter::ConfirmationRequired confirmation_required;
124 signin::Source source; 122 signin::Source source;
125 OneClickSigninSyncStarter::Callback callback; 123 OneClickSigninSyncStarter::Callback callback;
126 }; 124 };
127 125
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 // tries to display an infobar in the tab contents identified by the 205 // tries to display an infobar in the tab contents identified by the
208 // child/route id. 206 // child/route id.
209 static void ShowInfoBarIfPossible(net::URLRequest* request, 207 static void ShowInfoBarIfPossible(net::URLRequest* request,
210 ProfileIOData* io_data, 208 ProfileIOData* io_data,
211 int child_id, 209 int child_id,
212 int route_id); 210 int route_id);
213 211
214 // 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
215 // 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
216 // 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
217 // cross ccount error, and false otherwise. 215 // cross account error, and false otherwise.
218 static bool HandleCrossAccountError( 216 static bool HandleCrossAccountError(
219 content::WebContents* contents, 217 content::WebContents* contents,
220 const std::string& session_index, 218 const std::string& session_index,
221 const std::string& email, 219 const std::string& email,
222 const std::string& password, 220 const std::string& password,
223 const std::string& refresh_token, 221 const std::string& refresh_token,
224 OneClickSigninHelper::AutoAccept auto_accept, 222 OneClickSigninHelper::AutoAccept auto_accept,
225 signin::Source source, 223 signin::Source source,
226 OneClickSigninSyncStarter::StartSyncMode start_mode, 224 OneClickSigninSyncStarter::StartSyncMode start_mode,
227 OneClickSigninSyncStarter::Callback sync_callback); 225 OneClickSigninSyncStarter::Callback sync_callback);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 385
388 // Allows unittest to avoid starting sync for real. 386 // Allows unittest to avoid starting sync for real.
389 bool do_not_start_sync_for_testing_; 387 bool do_not_start_sync_for_testing_;
390 388
391 base::WeakPtrFactory<OneClickSigninHelper> weak_pointer_factory_; 389 base::WeakPtrFactory<OneClickSigninHelper> weak_pointer_factory_;
392 390
393 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); 391 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper);
394 }; 392 };
395 393
396 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ 394 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_manager_factory.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