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

Side by Side 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 browsertest Created 10 years 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_LOGIN_LOGIN_PROMPT_H_ 5 #ifndef CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_
6 #define CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_ 6 #define CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void OnRequestCancelled(); 63 void OnRequestCancelled();
64 64
65 // Implements the NotificationObserver interface. 65 // Implements the NotificationObserver interface.
66 // Listens for AUTH_SUPPLIED and AUTH_CANCELLED notifications from other 66 // Listens for AUTH_SUPPLIED and AUTH_CANCELLED notifications from other
67 // LoginHandlers so that this LoginHandler has the chance to dismiss itself 67 // LoginHandlers so that this LoginHandler has the chance to dismiss itself
68 // if it was waiting for the same authentication. 68 // if it was waiting for the same authentication.
69 virtual void Observe(NotificationType type, 69 virtual void Observe(NotificationType type,
70 const NotificationSource& source, 70 const NotificationSource& source,
71 const NotificationDetails& details); 71 const NotificationDetails& details);
72 72
73 // Who/where/what asked for the authentication.
74 net::AuthChallengeInfo* auth_info() const { return auth_info_.get(); }
cbentzel 2010/12/17 19:22:56 I know that you just moved this from protected to
asanka (google) 2010/12/17 21:35:35 I'll defer this to another CL since there are othe
75
73 protected: 76 protected:
74 void SetModel(LoginModel* model); 77 void SetModel(LoginModel* model);
75 78
76 void SetDialog(ConstrainedWindow* dialog); 79 void SetDialog(ConstrainedWindow* dialog);
77 80
78 // Notify observers that authentication is needed. 81 // Notify observers that authentication is needed.
79 void NotifyAuthNeeded(); 82 void NotifyAuthNeeded();
80 83
81 // Performs necessary cleanup before deletion. 84 // Performs necessary cleanup before deletion.
82 void ReleaseSoon(); 85 void ReleaseSoon();
83 86
84 // Who/where/what asked for the authentication.
85 net::AuthChallengeInfo* auth_info() const { return auth_info_.get(); }
86
87 private: 87 private:
88 // Starts observing notifications from other LoginHandlers. 88 // Starts observing notifications from other LoginHandlers.
89 void AddObservers(); 89 void AddObservers();
90 90
91 // Stops observing notifications from other LoginHandlers. 91 // Stops observing notifications from other LoginHandlers.
92 void RemoveObservers(); 92 void RemoveObservers();
93 93
94 // Notify observers that authentication is supplied. 94 // Notify observers that authentication is supplied.
95 void NotifyAuthSupplied(const std::wstring& username, 95 void NotifyAuthSupplied(const std::wstring& username,
96 const std::wstring& password); 96 const std::wstring& password);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // Helper to remove the ref from an net::URLRequest to the LoginHandler. 205 // Helper to remove the ref from an net::URLRequest to the LoginHandler.
206 // Should only be called from the IO thread, since it accesses an 206 // Should only be called from the IO thread, since it accesses an
207 // net::URLRequest. 207 // net::URLRequest.
208 void ResetLoginHandlerForRequest(net::URLRequest* request); 208 void ResetLoginHandlerForRequest(net::URLRequest* request);
209 209
210 // Get the signon_realm under which the identity should be saved. 210 // Get the signon_realm under which the identity should be saved.
211 std::string GetSignonRealm(const GURL& url, 211 std::string GetSignonRealm(const GURL& url,
212 const net::AuthChallengeInfo& auth_info); 212 const net::AuthChallengeInfo& auth_info);
213 213
214 #endif // CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_ 214 #endif // CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/login/login_prompt.cc » ('j') | chrome/browser/ui/login/login_prompt.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698