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

Unified Diff: chrome/browser/ui/login/login_prompt.h

Issue 5814005: Minimize login prompts (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Add const and fix braces Created 9 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/login/login_prompt.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/login/login_prompt.h
diff --git a/chrome/browser/ui/login/login_prompt.h b/chrome/browser/ui/login/login_prompt.h
index 8e3d15e0dc5f714997546b6bdef97baa2a1e9a0e..b56640285497cade0fb1185600b4d0f7678e7033 100644
--- a/chrome/browser/ui/login/login_prompt.h
+++ b/chrome/browser/ui/login/login_prompt.h
@@ -70,6 +70,12 @@ class LoginHandler : public base::RefCountedThreadSafe<LoginHandler>,
const NotificationSource& source,
const NotificationDetails& details);
+ // Who/where/what asked for the authentication.
+ const net::AuthChallengeInfo* auth_info() const { return auth_info_.get(); }
+
+ // Returns whether authentication had been handled (SetAuth or CancelAuth).
+ bool WasAuthHandled() const;
+
protected:
void SetModel(LoginModel* model);
@@ -81,9 +87,6 @@ class LoginHandler : public base::RefCountedThreadSafe<LoginHandler>,
// Performs necessary cleanup before deletion.
void ReleaseSoon();
- // Who/where/what asked for the authentication.
- net::AuthChallengeInfo* auth_info() const { return auth_info_.get(); }
-
private:
// Starts observing notifications from other LoginHandlers.
void AddObservers();
@@ -98,9 +101,9 @@ class LoginHandler : public base::RefCountedThreadSafe<LoginHandler>,
// Notify observers that authentication is cancelled.
void NotifyAuthCancelled();
- // Returns whether authentication had been handled (SetAuth or CancelAuth).
- // If |set_handled| is true, it will mark authentication as handled.
- bool WasAuthHandled(bool set_handled);
+ // Marks authentication as handled and returns the previous handled
+ // state.
+ bool TestAndSetAuthHandled();
// Calls SetAuth from the IO loop.
void SetAuthDeferred(const std::wstring& username,
@@ -114,7 +117,7 @@ class LoginHandler : public base::RefCountedThreadSafe<LoginHandler>,
// True if we've handled auth (SetAuth or CancelAuth has been called).
bool handled_auth_;
- Lock handled_auth_lock_;
+ mutable Lock handled_auth_lock_;
// The ConstrainedWindow that is hosting our LoginView.
// This should only be accessed on the UI loop.
« no previous file with comments | « no previous file | chrome/browser/ui/login/login_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698