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

Unified Diff: chrome/browser/extensions/extension_webrequest_api.cc

Issue 8340026: Use AuthCredentials throughout the network stack instead of username/password. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix comments Created 9 years, 2 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/extensions/extension_webrequest_api.cc
diff --git a/chrome/browser/extensions/extension_webrequest_api.cc b/chrome/browser/extensions/extension_webrequest_api.cc
index 144ad03e9efdb28606011648a4ebac727289aa9c..66fa8a56197b691f76ff90e552ccd4834c8a0d6f 100644
--- a/chrome/browser/extensions/extension_webrequest_api.cc
+++ b/chrome/browser/extensions/extension_webrequest_api.cc
@@ -1696,13 +1696,14 @@ bool WebRequestEventHandled::RunImpl() {
EXTENSION_FUNCTION_VALIDATE(value->GetDictionary(
keys::kAuthCredentialsKey,
&credentials_value));
- response->auth_credentials.reset(new net::AuthCredentials());
+ string16 username;
+ string16 password;
EXTENSION_FUNCTION_VALIDATE(
- credentials_value->GetString(keys::kUsernameKey,
- &response->auth_credentials->username));
+ credentials_value->GetString(keys::kUsernameKey, &username));
EXTENSION_FUNCTION_VALIDATE(
- credentials_value->GetString(keys::kPasswordKey,
- &response->auth_credentials->password));
+ credentials_value->GetString(keys::kPasswordKey, &password));
+ response->auth_credentials.reset(
+ new net::AuthCredentials(username, password));
}
}
« 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