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

Side by Side Diff: chrome/browser/signin/signin_manager.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, 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/signin/signin_browsertest.cc ('k') | chrome/browser/signin/signin_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // The signin manager encapsulates some functionality tracking 5 // The signin manager encapsulates some functionality tracking
6 // which user is signed in. See SigninManagerBase for full description of 6 // which user is signed in. See SigninManagerBase for full description of
7 // responsibilities. The class defined in this file provides functionality 7 // responsibilities. The class defined in this file provides functionality
8 // required by all platforms except Chrome OS. 8 // required by all platforms except Chrome OS.
9 // 9 //
10 // When a user is signed in, a ClientLogin request is run on their behalf. 10 // When a user is signed in, a ClientLogin request is run on their behalf.
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // be invoked on the IO thread, and can be used to check if signin is enabled 179 // be invoked on the IO thread, and can be used to check if signin is enabled
180 // on that thread. 180 // on that thread.
181 static bool IsSigninAllowedOnIOThread(ProfileIOData* io_data); 181 static bool IsSigninAllowedOnIOThread(ProfileIOData* io_data);
182 182
183 // Allows the SigninManager to track the privileged signin process 183 // Allows the SigninManager to track the privileged signin process
184 // identified by |process_id| so that we can later ask (via IsSigninProcess) 184 // identified by |process_id| so that we can later ask (via IsSigninProcess)
185 // if it is safe to sign the user in from the current context (see 185 // if it is safe to sign the user in from the current context (see
186 // OneClickSigninHelper). All of this tracking state is reset once the 186 // OneClickSigninHelper). All of this tracking state is reset once the
187 // renderer process terminates. 187 // renderer process terminates.
188 void SetSigninProcess(int process_id); 188 void SetSigninProcess(int process_id);
189 void ClearSigninProcess();
189 bool IsSigninProcess(int process_id) const; 190 bool IsSigninProcess(int process_id) const;
190 bool HasSigninProcess() const; 191 bool HasSigninProcess() const;
191 192
192 protected: 193 protected:
193 // If user was signed in, load tokens from DB if available. 194 // If user was signed in, load tokens from DB if available.
194 virtual void InitTokenService() OVERRIDE; 195 virtual void InitTokenService() OVERRIDE;
195 196
196 // Flag saying whether signing out is allowed. 197 // Flag saying whether signing out is allowed.
197 bool prohibit_signout_; 198 bool prohibit_signout_;
198 199
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 298
298 // Helper object to listen for changes to the signin allowed preference. 299 // Helper object to listen for changes to the signin allowed preference.
299 BooleanPrefMember signin_allowed_; 300 BooleanPrefMember signin_allowed_;
300 301
301 DISALLOW_COPY_AND_ASSIGN(SigninManager); 302 DISALLOW_COPY_AND_ASSIGN(SigninManager);
302 }; 303 };
303 304
304 #endif // !defined(OS_CHROMEOS) 305 #endif // !defined(OS_CHROMEOS)
305 306
306 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_ 307 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_browsertest.cc ('k') | chrome/browser/signin/signin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698