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

Side by Side Diff: extensions/browser/api/web_request/web_request_api.cc

Issue 1297503004: Adding Null check in onAuthRequired() for handling FTP requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | 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 #include "extensions/browser/api/web_request/web_request_api.h" 5 #include "extensions/browser/api/web_request/web_request_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 dict->SetBoolean(keys::kIsProxyKey, auth_info.is_proxy); 990 dict->SetBoolean(keys::kIsProxyKey, auth_info.is_proxy);
991 if (!auth_info.scheme.empty()) 991 if (!auth_info.scheme.empty())
992 dict->SetString(keys::kSchemeKey, auth_info.scheme); 992 dict->SetString(keys::kSchemeKey, auth_info.scheme);
993 if (!auth_info.realm.empty()) 993 if (!auth_info.realm.empty())
994 dict->SetString(keys::kRealmKey, auth_info.realm); 994 dict->SetString(keys::kRealmKey, auth_info.realm);
995 base::DictionaryValue* challenger = new base::DictionaryValue(); 995 base::DictionaryValue* challenger = new base::DictionaryValue();
996 challenger->SetString(keys::kHostKey, auth_info.challenger.host()); 996 challenger->SetString(keys::kHostKey, auth_info.challenger.host());
997 challenger->SetInteger(keys::kPortKey, auth_info.challenger.port()); 997 challenger->SetInteger(keys::kPortKey, auth_info.challenger.port());
998 dict->Set(keys::kChallengerKey, challenger); 998 dict->Set(keys::kChallengerKey, challenger);
999 dict->Set(keys::kStatusLineKey, GetStatusLine(request->response_headers())); 999 dict->Set(keys::kStatusLineKey, GetStatusLine(request->response_headers()));
1000 dict->SetInteger(keys::kStatusCodeKey, 1000 if (request->response_headers())
1001 dict->SetInteger(keys::kStatusCodeKey,
1001 request->response_headers()->response_code()); 1002 request->response_headers()->response_code());
not at google - send to devlin 2015/08/19 14:43:25 Make sure to run "git cl format" before submitting
shiva.jm 2015/08/20 04:07:37 Done.
1002 if (extra_info_spec & ExtraInfoSpec::RESPONSE_HEADERS) { 1003 if (extra_info_spec & ExtraInfoSpec::RESPONSE_HEADERS) {
1003 dict->Set(keys::kResponseHeadersKey, 1004 dict->Set(keys::kResponseHeadersKey,
1004 GetResponseHeadersList(request->response_headers())); 1005 GetResponseHeadersList(request->response_headers()));
1005 } 1006 }
1006 args.Append(dict); 1007 args.Append(dict);
1007 1008
1008 if (DispatchEvent(browser_context, request, listeners, args)) { 1009 if (DispatchEvent(browser_context, request, listeners, args)) {
1009 blocked_requests_[request->identifier()].event = kOnAuthRequired; 1010 blocked_requests_[request->identifier()].event = kOnAuthRequired;
1010 blocked_requests_[request->identifier()].is_incognito |= 1011 blocked_requests_[request->identifier()].is_incognito |=
1011 IsIncognitoBrowserContext(browser_context); 1012 IsIncognitoBrowserContext(browser_context);
(...skipping 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after
2496 // Continue gracefully. 2497 // Continue gracefully.
2497 RunSync(); 2498 RunSync();
2498 } 2499 }
2499 2500
2500 bool WebRequestHandlerBehaviorChangedFunction::RunSync() { 2501 bool WebRequestHandlerBehaviorChangedFunction::RunSync() {
2501 helpers::ClearCacheOnNavigation(); 2502 helpers::ClearCacheOnNavigation();
2502 return true; 2503 return true;
2503 } 2504 }
2504 2505
2505 } // namespace extensions 2506 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698