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

Side by Side Diff: chrome/browser/extensions/api/web_request/web_request_api_helpers.cc

Issue 503033002: Move ExtensionWarningService and ExtensionsWarningSet to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@3_web_view_internal
Patch Set: Rename. Created 6 years, 3 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
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 "chrome/browser/extensions/api/web_request/web_request_api_helpers.h" 5 #include "chrome/browser/extensions/api/web_request/web_request_api_helpers.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
16 #include "chrome/browser/extensions/api/web_request/web_request_api.h" 16 #include "chrome/browser/extensions/api/web_request/web_request_api.h"
17 #include "chrome/browser/extensions/extension_warning_set.h"
18 #include "chrome/browser/profiles/profile_manager.h" 17 #include "chrome/browser/profiles/profile_manager.h"
19 #include "chrome/browser/renderer_host/web_cache_manager.h" 18 #include "chrome/browser/renderer_host/web_cache_manager.h"
20 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
21 #include "content/public/browser/render_process_host.h" 20 #include "content/public/browser/render_process_host.h"
22 #include "extensions/browser/extension_system.h" 21 #include "extensions/browser/extension_system.h"
23 #include "extensions/browser/runtime_data.h" 22 #include "extensions/browser/runtime_data.h"
23 #include "extensions/browser/warning_set.h"
24 #include "net/base/net_log.h" 24 #include "net/base/net_log.h"
25 #include "net/cookies/cookie_util.h" 25 #include "net/cookies/cookie_util.h"
26 #include "net/cookies/parsed_cookie.h" 26 #include "net/cookies/parsed_cookie.h"
27 #include "net/http/http_util.h" 27 #include "net/http/http_util.h"
28 #include "net/url_request/url_request.h" 28 #include "net/url_request/url_request.h"
29 #include "url/url_constants.h" 29 #include "url/url_constants.h"
30 30
31 // TODO(battre): move all static functions into an anonymous namespace at the 31 // TODO(battre): move all static functions into an anonymous namespace at the
32 // top of this file. 32 // top of this file.
33 33
34 using base::Time; 34 using base::Time;
35 using content::ResourceType; 35 using content::ResourceType;
36 using extensions::ExtensionWarning; 36 using extensions::Warning;
James Cook 2014/08/26 22:01:31 nit: I either wouldn't do this, or add "using exte
Xi Han 2014/08/27 13:32:54 Removed.
37 using net::cookie_util::ParsedRequestCookie; 37 using net::cookie_util::ParsedRequestCookie;
38 using net::cookie_util::ParsedRequestCookies; 38 using net::cookie_util::ParsedRequestCookies;
39 39
40 namespace extension_web_request_api_helpers { 40 namespace extension_web_request_api_helpers {
41 41
42 namespace { 42 namespace {
43 43
44 typedef std::vector<linked_ptr<net::ParsedCookie> > ParsedResponseCookies; 44 typedef std::vector<linked_ptr<net::ParsedCookie> > ParsedResponseCookies;
45 45
46 static const char* kResourceTypeStrings[] = { 46 static const char* kResourceTypeStrings[] = {
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 // Helper function for MergeRedirectUrlOfResponses() that allows ignoring 408 // Helper function for MergeRedirectUrlOfResponses() that allows ignoring
409 // all redirects but those to data:// urls and about:blank. This is important 409 // all redirects but those to data:// urls and about:blank. This is important
410 // to treat these URLs as "cancel urls", i.e. URLs that extensions redirect 410 // to treat these URLs as "cancel urls", i.e. URLs that extensions redirect
411 // to if they want to express that they want to cancel a request. This reduces 411 // to if they want to express that they want to cancel a request. This reduces
412 // the number of conflicts that we need to flag, as canceling is considered 412 // the number of conflicts that we need to flag, as canceling is considered
413 // a higher precedence operation that redirects. 413 // a higher precedence operation that redirects.
414 // Returns whether a redirect occurred. 414 // Returns whether a redirect occurred.
415 static bool MergeRedirectUrlOfResponsesHelper( 415 static bool MergeRedirectUrlOfResponsesHelper(
416 const EventResponseDeltas& deltas, 416 const EventResponseDeltas& deltas,
417 GURL* new_url, 417 GURL* new_url,
418 extensions::ExtensionWarningSet* conflicting_extensions, 418 extensions::WarningSet* conflicting_extensions,
419 const net::BoundNetLog* net_log, 419 const net::BoundNetLog* net_log,
420 bool consider_only_cancel_scheme_urls) { 420 bool consider_only_cancel_scheme_urls) {
421 bool redirected = false; 421 bool redirected = false;
422 422
423 // Extension that determines the |new_url|. 423 // Extension that determines the |new_url|.
424 std::string winning_extension_id; 424 std::string winning_extension_id;
425 EventResponseDeltas::const_iterator delta; 425 EventResponseDeltas::const_iterator delta;
426 for (delta = deltas.begin(); delta != deltas.end(); ++delta) { 426 for (delta = deltas.begin(); delta != deltas.end(); ++delta) {
427 if ((*delta)->new_url.is_empty()) 427 if ((*delta)->new_url.is_empty())
428 continue; 428 continue;
429 if (consider_only_cancel_scheme_urls && 429 if (consider_only_cancel_scheme_urls &&
430 !(*delta)->new_url.SchemeIs(url::kDataScheme) && 430 !(*delta)->new_url.SchemeIs(url::kDataScheme) &&
431 (*delta)->new_url.spec() != "about:blank") { 431 (*delta)->new_url.spec() != "about:blank") {
432 continue; 432 continue;
433 } 433 }
434 434
435 if (!redirected || *new_url == (*delta)->new_url) { 435 if (!redirected || *new_url == (*delta)->new_url) {
436 *new_url = (*delta)->new_url; 436 *new_url = (*delta)->new_url;
437 winning_extension_id = (*delta)->extension_id; 437 winning_extension_id = (*delta)->extension_id;
438 redirected = true; 438 redirected = true;
439 net_log->AddEvent( 439 net_log->AddEvent(
440 net::NetLog::TYPE_CHROME_EXTENSION_REDIRECTED_REQUEST, 440 net::NetLog::TYPE_CHROME_EXTENSION_REDIRECTED_REQUEST,
441 CreateNetLogExtensionIdCallback(delta->get())); 441 CreateNetLogExtensionIdCallback(delta->get()));
442 } else { 442 } else {
443 conflicting_extensions->insert( 443 conflicting_extensions->insert(
444 ExtensionWarning::CreateRedirectConflictWarning( 444 Warning::CreateRedirectConflictWarning(
445 (*delta)->extension_id, 445 (*delta)->extension_id,
446 winning_extension_id, 446 winning_extension_id,
447 (*delta)->new_url, 447 (*delta)->new_url,
448 *new_url)); 448 *new_url));
449 net_log->AddEvent( 449 net_log->AddEvent(
450 net::NetLog::TYPE_CHROME_EXTENSION_IGNORED_DUE_TO_CONFLICT, 450 net::NetLog::TYPE_CHROME_EXTENSION_IGNORED_DUE_TO_CONFLICT,
451 CreateNetLogExtensionIdCallback(delta->get())); 451 CreateNetLogExtensionIdCallback(delta->get()));
452 } 452 }
453 } 453 }
454 return redirected; 454 return redirected;
455 } 455 }
456 456
457 void MergeRedirectUrlOfResponses( 457 void MergeRedirectUrlOfResponses(
458 const EventResponseDeltas& deltas, 458 const EventResponseDeltas& deltas,
459 GURL* new_url, 459 GURL* new_url,
460 extensions::ExtensionWarningSet* conflicting_extensions, 460 extensions::WarningSet* conflicting_extensions,
461 const net::BoundNetLog* net_log) { 461 const net::BoundNetLog* net_log) {
462 462
463 // First handle only redirects to data:// URLs and about:blank. These are a 463 // First handle only redirects to data:// URLs and about:blank. These are a
464 // special case as they represent a way of cancelling a request. 464 // special case as they represent a way of cancelling a request.
465 if (MergeRedirectUrlOfResponsesHelper( 465 if (MergeRedirectUrlOfResponsesHelper(
466 deltas, new_url, conflicting_extensions, net_log, true)) { 466 deltas, new_url, conflicting_extensions, net_log, true)) {
467 // If any extension cancelled a request by redirecting to a data:// URL or 467 // If any extension cancelled a request by redirecting to a data:// URL or
468 // about:blank, we don't consider the other redirects. 468 // about:blank, we don't consider the other redirects.
469 return; 469 return;
470 } 470 }
471 471
472 // Handle all other redirects. 472 // Handle all other redirects.
473 MergeRedirectUrlOfResponsesHelper( 473 MergeRedirectUrlOfResponsesHelper(
474 deltas, new_url, conflicting_extensions, net_log, false); 474 deltas, new_url, conflicting_extensions, net_log, false);
475 } 475 }
476 476
477 void MergeOnBeforeRequestResponses( 477 void MergeOnBeforeRequestResponses(
478 const EventResponseDeltas& deltas, 478 const EventResponseDeltas& deltas,
479 GURL* new_url, 479 GURL* new_url,
480 extensions::ExtensionWarningSet* conflicting_extensions, 480 extensions::WarningSet* conflicting_extensions,
481 const net::BoundNetLog* net_log) { 481 const net::BoundNetLog* net_log) {
482 MergeRedirectUrlOfResponses(deltas, new_url, conflicting_extensions, net_log); 482 MergeRedirectUrlOfResponses(deltas, new_url, conflicting_extensions, net_log);
483 } 483 }
484 484
485 static bool DoesRequestCookieMatchFilter( 485 static bool DoesRequestCookieMatchFilter(
486 const ParsedRequestCookie& cookie, 486 const ParsedRequestCookie& cookie,
487 RequestCookie* filter) { 487 RequestCookie* filter) {
488 if (!filter) return true; 488 if (!filter) return true;
489 if (filter->name.get() && cookie.first != *filter->name) return false; 489 if (filter->name.get() && cookie.first != *filter->name) return false;
490 if (filter->value.get() && cookie.second != *filter->value) return false; 490 if (filter->value.get() && cookie.second != *filter->value) return false;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 } 596 }
597 } 597 }
598 } 598 }
599 } 599 }
600 return modified; 600 return modified;
601 } 601 }
602 602
603 void MergeCookiesInOnBeforeSendHeadersResponses( 603 void MergeCookiesInOnBeforeSendHeadersResponses(
604 const EventResponseDeltas& deltas, 604 const EventResponseDeltas& deltas,
605 net::HttpRequestHeaders* request_headers, 605 net::HttpRequestHeaders* request_headers,
606 extensions::ExtensionWarningSet* conflicting_extensions, 606 extensions::WarningSet* conflicting_extensions,
607 const net::BoundNetLog* net_log) { 607 const net::BoundNetLog* net_log) {
608 // Skip all work if there are no registered cookie modifications. 608 // Skip all work if there are no registered cookie modifications.
609 bool cookie_modifications_exist = false; 609 bool cookie_modifications_exist = false;
610 EventResponseDeltas::const_iterator delta; 610 EventResponseDeltas::const_iterator delta;
611 for (delta = deltas.begin(); delta != deltas.end(); ++delta) { 611 for (delta = deltas.begin(); delta != deltas.end(); ++delta) {
612 cookie_modifications_exist |= 612 cookie_modifications_exist |=
613 !(*delta)->request_cookie_modifications.empty(); 613 !(*delta)->request_cookie_modifications.empty();
614 } 614 }
615 if (!cookie_modifications_exist) 615 if (!cookie_modifications_exist)
616 return; 616 return;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 if (*i == key) 668 if (*i == key)
669 return (*delta)->extension_id; 669 return (*delta)->extension_id;
670 } 670 }
671 } 671 }
672 return std::string(); 672 return std::string();
673 } 673 }
674 674
675 void MergeOnBeforeSendHeadersResponses( 675 void MergeOnBeforeSendHeadersResponses(
676 const EventResponseDeltas& deltas, 676 const EventResponseDeltas& deltas,
677 net::HttpRequestHeaders* request_headers, 677 net::HttpRequestHeaders* request_headers,
678 extensions::ExtensionWarningSet* conflicting_extensions, 678 extensions::WarningSet* conflicting_extensions,
679 const net::BoundNetLog* net_log) { 679 const net::BoundNetLog* net_log) {
680 EventResponseDeltas::const_iterator delta; 680 EventResponseDeltas::const_iterator delta;
681 681
682 // Here we collect which headers we have removed or set to new values 682 // Here we collect which headers we have removed or set to new values
683 // so far due to extensions of higher precedence. 683 // so far due to extensions of higher precedence.
684 std::set<std::string> removed_headers; 684 std::set<std::string> removed_headers;
685 std::set<std::string> set_headers; 685 std::set<std::string> set_headers;
686 686
687 // We assume here that the deltas are sorted in decreasing extension 687 // We assume here that the deltas are sorted in decreasing extension
688 // precedence (i.e. decreasing extension installation time). 688 // precedence (i.e. decreasing extension installation time).
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 ++key) { 769 ++key) {
770 request_headers->RemoveHeader(*key); 770 request_headers->RemoveHeader(*key);
771 removed_headers.insert(*key); 771 removed_headers.insert(*key);
772 } 772 }
773 } 773 }
774 net_log->AddEvent( 774 net_log->AddEvent(
775 net::NetLog::TYPE_CHROME_EXTENSION_MODIFIED_HEADERS, 775 net::NetLog::TYPE_CHROME_EXTENSION_MODIFIED_HEADERS,
776 base::Bind(&NetLogModificationCallback, delta->get())); 776 base::Bind(&NetLogModificationCallback, delta->get()));
777 } else { 777 } else {
778 conflicting_extensions->insert( 778 conflicting_extensions->insert(
779 ExtensionWarning::CreateRequestHeaderConflictWarning( 779 Warning::CreateRequestHeaderConflictWarning(
780 (*delta)->extension_id, winning_extension_id, 780 (*delta)->extension_id, winning_extension_id,
781 conflicting_header)); 781 conflicting_header));
782 net_log->AddEvent( 782 net_log->AddEvent(
783 net::NetLog::TYPE_CHROME_EXTENSION_IGNORED_DUE_TO_CONFLICT, 783 net::NetLog::TYPE_CHROME_EXTENSION_IGNORED_DUE_TO_CONFLICT,
784 CreateNetLogExtensionIdCallback(delta->get())); 784 CreateNetLogExtensionIdCallback(delta->get()));
785 } 785 }
786 } 786 }
787 787
788 MergeCookiesInOnBeforeSendHeadersResponses(deltas, request_headers, 788 MergeCookiesInOnBeforeSendHeadersResponses(deltas, request_headers,
789 conflicting_extensions, net_log); 789 conflicting_extensions, net_log);
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 } 976 }
977 } 977 }
978 } 978 }
979 return modified; 979 return modified;
980 } 980 }
981 981
982 void MergeCookiesInOnHeadersReceivedResponses( 982 void MergeCookiesInOnHeadersReceivedResponses(
983 const EventResponseDeltas& deltas, 983 const EventResponseDeltas& deltas,
984 const net::HttpResponseHeaders* original_response_headers, 984 const net::HttpResponseHeaders* original_response_headers,
985 scoped_refptr<net::HttpResponseHeaders>* override_response_headers, 985 scoped_refptr<net::HttpResponseHeaders>* override_response_headers,
986 extensions::ExtensionWarningSet* conflicting_extensions, 986 extensions::WarningSet* conflicting_extensions,
987 const net::BoundNetLog* net_log) { 987 const net::BoundNetLog* net_log) {
988 // Skip all work if there are no registered cookie modifications. 988 // Skip all work if there are no registered cookie modifications.
989 bool cookie_modifications_exist = false; 989 bool cookie_modifications_exist = false;
990 EventResponseDeltas::const_reverse_iterator delta; 990 EventResponseDeltas::const_reverse_iterator delta;
991 for (delta = deltas.rbegin(); delta != deltas.rend(); ++delta) { 991 for (delta = deltas.rbegin(); delta != deltas.rend(); ++delta) {
992 cookie_modifications_exist |= 992 cookie_modifications_exist |=
993 !(*delta)->response_cookie_modifications.empty(); 993 !(*delta)->response_cookie_modifications.empty();
994 } 994 }
995 if (!cookie_modifications_exist) 995 if (!cookie_modifications_exist)
996 return; 996 return;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 } 1037 }
1038 } 1038 }
1039 return std::string(); 1039 return std::string();
1040 } 1040 }
1041 1041
1042 void MergeOnHeadersReceivedResponses( 1042 void MergeOnHeadersReceivedResponses(
1043 const EventResponseDeltas& deltas, 1043 const EventResponseDeltas& deltas,
1044 const net::HttpResponseHeaders* original_response_headers, 1044 const net::HttpResponseHeaders* original_response_headers,
1045 scoped_refptr<net::HttpResponseHeaders>* override_response_headers, 1045 scoped_refptr<net::HttpResponseHeaders>* override_response_headers,
1046 GURL* allowed_unsafe_redirect_url, 1046 GURL* allowed_unsafe_redirect_url,
1047 extensions::ExtensionWarningSet* conflicting_extensions, 1047 extensions::WarningSet* conflicting_extensions,
1048 const net::BoundNetLog* net_log) { 1048 const net::BoundNetLog* net_log) {
1049 EventResponseDeltas::const_iterator delta; 1049 EventResponseDeltas::const_iterator delta;
1050 1050
1051 // Here we collect which headers we have removed or added so far due to 1051 // Here we collect which headers we have removed or added so far due to
1052 // extensions of higher precedence. Header keys are always stored as 1052 // extensions of higher precedence. Header keys are always stored as
1053 // lower case. 1053 // lower case.
1054 std::set<ResponseHeader> removed_headers; 1054 std::set<ResponseHeader> removed_headers;
1055 std::set<ResponseHeader> added_headers; 1055 std::set<ResponseHeader> added_headers;
1056 1056
1057 // We assume here that the deltas are sorted in decreasing extension 1057 // We assume here that the deltas are sorted in decreasing extension
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 continue; 1107 continue;
1108 added_headers.insert(lowercase_header); 1108 added_headers.insert(lowercase_header);
1109 (*override_response_headers)->AddHeader(i->first + ": " + i->second); 1109 (*override_response_headers)->AddHeader(i->first + ": " + i->second);
1110 } 1110 }
1111 } 1111 }
1112 net_log->AddEvent( 1112 net_log->AddEvent(
1113 net::NetLog::TYPE_CHROME_EXTENSION_MODIFIED_HEADERS, 1113 net::NetLog::TYPE_CHROME_EXTENSION_MODIFIED_HEADERS,
1114 CreateNetLogExtensionIdCallback(delta->get())); 1114 CreateNetLogExtensionIdCallback(delta->get()));
1115 } else { 1115 } else {
1116 conflicting_extensions->insert( 1116 conflicting_extensions->insert(
1117 ExtensionWarning::CreateResponseHeaderConflictWarning( 1117 Warning::CreateResponseHeaderConflictWarning(
1118 (*delta)->extension_id, winning_extension_id, 1118 (*delta)->extension_id, winning_extension_id,
1119 conflicting_header)); 1119 conflicting_header));
1120 net_log->AddEvent( 1120 net_log->AddEvent(
1121 net::NetLog::TYPE_CHROME_EXTENSION_IGNORED_DUE_TO_CONFLICT, 1121 net::NetLog::TYPE_CHROME_EXTENSION_IGNORED_DUE_TO_CONFLICT,
1122 CreateNetLogExtensionIdCallback(delta->get())); 1122 CreateNetLogExtensionIdCallback(delta->get()));
1123 } 1123 }
1124 } 1124 }
1125 1125
1126 MergeCookiesInOnHeadersReceivedResponses(deltas, original_response_headers, 1126 MergeCookiesInOnHeadersReceivedResponses(deltas, original_response_headers,
1127 override_response_headers, conflicting_extensions, net_log); 1127 override_response_headers, conflicting_extensions, net_log);
(...skipping 12 matching lines...) Expand all
1140 (*override_response_headers)->AddHeader("Location: " + new_url.spec()); 1140 (*override_response_headers)->AddHeader("Location: " + new_url.spec());
1141 // Explicitly mark the URL as safe for redirection, to prevent the request 1141 // Explicitly mark the URL as safe for redirection, to prevent the request
1142 // from being blocked because of net::ERR_UNSAFE_REDIRECT. 1142 // from being blocked because of net::ERR_UNSAFE_REDIRECT.
1143 *allowed_unsafe_redirect_url = new_url; 1143 *allowed_unsafe_redirect_url = new_url;
1144 } 1144 }
1145 } 1145 }
1146 1146
1147 bool MergeOnAuthRequiredResponses( 1147 bool MergeOnAuthRequiredResponses(
1148 const EventResponseDeltas& deltas, 1148 const EventResponseDeltas& deltas,
1149 net::AuthCredentials* auth_credentials, 1149 net::AuthCredentials* auth_credentials,
1150 extensions::ExtensionWarningSet* conflicting_extensions, 1150 extensions::WarningSet* conflicting_extensions,
1151 const net::BoundNetLog* net_log) { 1151 const net::BoundNetLog* net_log) {
1152 CHECK(auth_credentials); 1152 CHECK(auth_credentials);
1153 bool credentials_set = false; 1153 bool credentials_set = false;
1154 std::string winning_extension_id; 1154 std::string winning_extension_id;
1155 1155
1156 for (EventResponseDeltas::const_iterator delta = deltas.begin(); 1156 for (EventResponseDeltas::const_iterator delta = deltas.begin();
1157 delta != deltas.end(); 1157 delta != deltas.end();
1158 ++delta) { 1158 ++delta) {
1159 if (!(*delta)->auth_credentials.get()) 1159 if (!(*delta)->auth_credentials.get())
1160 continue; 1160 continue;
1161 bool different = 1161 bool different =
1162 auth_credentials->username() != 1162 auth_credentials->username() !=
1163 (*delta)->auth_credentials->username() || 1163 (*delta)->auth_credentials->username() ||
1164 auth_credentials->password() != (*delta)->auth_credentials->password(); 1164 auth_credentials->password() != (*delta)->auth_credentials->password();
1165 if (credentials_set && different) { 1165 if (credentials_set && different) {
1166 conflicting_extensions->insert( 1166 conflicting_extensions->insert(
1167 ExtensionWarning::CreateCredentialsConflictWarning( 1167 Warning::CreateCredentialsConflictWarning(
1168 (*delta)->extension_id, winning_extension_id)); 1168 (*delta)->extension_id, winning_extension_id));
1169 net_log->AddEvent( 1169 net_log->AddEvent(
1170 net::NetLog::TYPE_CHROME_EXTENSION_IGNORED_DUE_TO_CONFLICT, 1170 net::NetLog::TYPE_CHROME_EXTENSION_IGNORED_DUE_TO_CONFLICT,
1171 CreateNetLogExtensionIdCallback(delta->get())); 1171 CreateNetLogExtensionIdCallback(delta->get()));
1172 } else { 1172 } else {
1173 net_log->AddEvent( 1173 net_log->AddEvent(
1174 net::NetLog::TYPE_CHROME_EXTENSION_PROVIDE_AUTH_CREDENTIALS, 1174 net::NetLog::TYPE_CHROME_EXTENSION_PROVIDE_AUTH_CREDENTIALS,
1175 CreateNetLogExtensionIdCallback(delta->get())); 1175 CreateNetLogExtensionIdCallback(delta->get()));
1176 *auth_credentials = *(*delta)->auth_credentials; 1176 *auth_credentials = *(*delta)->auth_credentials;
1177 credentials_set = true; 1177 credentials_set = true;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 for (content::RenderProcessHost::iterator it = 1236 for (content::RenderProcessHost::iterator it =
1237 content::RenderProcessHost::AllHostsIterator(); 1237 content::RenderProcessHost::AllHostsIterator();
1238 !it.IsAtEnd(); it.Advance()) { 1238 !it.IsAtEnd(); it.Advance()) {
1239 content::RenderProcessHost* host = it.GetCurrentValue(); 1239 content::RenderProcessHost* host = it.GetCurrentValue();
1240 if (host->GetBrowserContext() == browser_context) 1240 if (host->GetBrowserContext() == browser_context)
1241 SendExtensionWebRequestStatusToHost(host); 1241 SendExtensionWebRequestStatusToHost(host);
1242 } 1242 }
1243 } 1243 }
1244 1244
1245 } // namespace extension_web_request_api_helpers 1245 } // namespace extension_web_request_api_helpers
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698