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

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

Issue 17727002: Stop trusting the sign-in process if it manages to navigate to another URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test Created 7 years, 6 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"
11 #include "chrome/browser/sync/profile_sync_service_observer.h" 11 #include "chrome/browser/sync/profile_sync_service_observer.h"
12 #include "chrome/browser/ui/sync/sync_promo_ui.h" 12 #include "chrome/browser/ui/sync/sync_promo_ui.h"
13 #include "content/public/browser/navigation_controller.h" 13 #include "content/public/browser/navigation_controller.h"
14 #include "content/public/browser/web_contents_observer.h" 14 #include "content/public/browser/web_contents_observer.h"
15 #include "content/public/browser/web_contents_user_data.h" 15 #include "content/public/browser/web_contents_user_data.h"
16 #include "google_apis/gaia/google_service_auth_error.h" 16 #include "google_apis/gaia/google_service_auth_error.h"
17 17
18 class Browser; 18 class Browser;
19 class GURL; 19 class GURL;
20 class ProfileIOData; 20 class ProfileIOData;
21 21
22 namespace content { 22 namespace content {
23 class WebContents; 23 class WebContents;
24 struct FrameNavigateParams;
25 struct LoadCommittedDetails;
24 struct PasswordForm; 26 struct PasswordForm;
25 } 27 }
26 28
27 namespace net { 29 namespace net {
28 class URLRequest; 30 class URLRequest;
29 } 31 }
30 32
31 // Per-tab one-click signin helper. When a user signs in to a Google service 33 // Per-tab one-click signin helper. When a user signs in to a Google service
32 // and the profile is not yet connected to a Google account, will start the 34 // and the profile is not yet connected to a Google account, will start the
33 // process of helping the user connect his profile with one click. The process 35 // process of helping the user connect his profile with one click. The process
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 void SetDoNotClearPendingEmailForTesting(); 204 void SetDoNotClearPendingEmailForTesting();
203 205
204 // Grab Gaia password if available. 206 // Grab Gaia password if available.
205 bool OnFormSubmitted(const content::PasswordForm& form); 207 bool OnFormSubmitted(const content::PasswordForm& form);
206 208
207 // content::WebContentsObserver overrides. 209 // content::WebContentsObserver overrides.
208 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 210 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
209 virtual void NavigateToPendingEntry( 211 virtual void NavigateToPendingEntry(
210 const GURL& url, 212 const GURL& url,
211 content::NavigationController::ReloadType reload_type) OVERRIDE; 213 content::NavigationController::ReloadType reload_type) OVERRIDE;
214 virtual void DidNavigateMainFrame(
215 const content::LoadCommittedDetails& details,
216 const content::FrameNavigateParams& params) OVERRIDE;
212 virtual void DidStopLoading( 217 virtual void DidStopLoading(
213 content::RenderViewHost* render_view_host) OVERRIDE; 218 content::RenderViewHost* render_view_host) OVERRIDE;
214 219
215 // ProfileSyncServiceObserver. 220 // ProfileSyncServiceObserver.
216 virtual void OnStateChanged() OVERRIDE; 221 virtual void OnStateChanged() OVERRIDE;
217 222
218 // Tracks if we are in the process of showing the signin or one click 223 // Tracks if we are in the process of showing the signin or one click
219 // interstitial page. It's set to true the first time we load one of those 224 // interstitial page. It's set to true the first time we load one of those
220 // pages and set to false when transient state is cleaned. 225 // pages and set to false when transient state is cleaned.
221 // Note: This should only be used for logging purposes. 226 // Note: This should only be used for logging purposes.
(...skipping 26 matching lines...) Expand all
248 bool untrusted_confirmation_required_; 253 bool untrusted_confirmation_required_;
249 254
250 // Allows unittests to avoid accessing the ResourceContext for clearing a 255 // Allows unittests to avoid accessing the ResourceContext for clearing a
251 // pending e-mail. 256 // pending e-mail.
252 bool do_not_clear_pending_email_; 257 bool do_not_clear_pending_email_;
253 258
254 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); 259 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper);
255 }; 260 };
256 261
257 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ 262 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_manager.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