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

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

Issue 15825008: Remove the event URL security check out of the renderer and into the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add self check Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/app_window_contents.cc » ('j') | 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 "chrome/browser/extensions/api/web_request/web_request_api.h" 5 #include "chrome/browser/extensions/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 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 DictionaryValue* dict = NULL; 1092 DictionaryValue* dict = NULL;
1093 CHECK(args_filtered->GetDictionary(0, &dict) && dict); 1093 CHECK(args_filtered->GetDictionary(0, &dict) && dict);
1094 if (!((*it)->extra_info_spec & ExtraInfoSpec::REQUEST_HEADERS)) 1094 if (!((*it)->extra_info_spec & ExtraInfoSpec::REQUEST_HEADERS))
1095 dict->Remove(keys::kRequestHeadersKey, NULL); 1095 dict->Remove(keys::kRequestHeadersKey, NULL);
1096 if (!((*it)->extra_info_spec & ExtraInfoSpec::RESPONSE_HEADERS)) 1096 if (!((*it)->extra_info_spec & ExtraInfoSpec::RESPONSE_HEADERS))
1097 dict->Remove(keys::kResponseHeadersKey, NULL); 1097 dict->Remove(keys::kResponseHeadersKey, NULL);
1098 1098
1099 extensions::EventRouter::DispatchEvent( 1099 extensions::EventRouter::DispatchEvent(
1100 (*it)->ipc_sender.get(), profile_id, 1100 (*it)->ipc_sender.get(), profile_id,
1101 (*it)->extension_id, (*it)->sub_event_name, 1101 (*it)->extension_id, (*it)->sub_event_name,
1102 args_filtered.Pass(), GURL(), 1102 args_filtered.Pass(),
1103 extensions::EventRouter::USER_GESTURE_UNKNOWN, 1103 extensions::EventRouter::USER_GESTURE_UNKNOWN,
1104 extensions::EventFilteringInfo()); 1104 extensions::EventFilteringInfo());
1105 if ((*it)->extra_info_spec & 1105 if ((*it)->extra_info_spec &
1106 (ExtraInfoSpec::BLOCKING | ExtraInfoSpec::ASYNC_BLOCKING)) { 1106 (ExtraInfoSpec::BLOCKING | ExtraInfoSpec::ASYNC_BLOCKING)) {
1107 (*it)->blocked_requests.insert(request->identifier()); 1107 (*it)->blocked_requests.insert(request->identifier());
1108 ++num_handlers_blocking; 1108 ++num_handlers_blocking;
1109 1109
1110 request->SetLoadStateParam( 1110 request->SetLoadStateParam(
1111 l10n_util::GetStringFUTF16(IDS_LOAD_STATE_PARAMETER_EXTENSION, 1111 l10n_util::GetStringFUTF16(IDS_LOAD_STATE_PARAMETER_EXTENSION,
1112 UTF8ToUTF16((*it)->extension_name))); 1112 UTF8ToUTF16((*it)->extension_name)));
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
2264 } else if ((*it)->name().find("AdBlock") != std::string::npos) { 2264 } else if ((*it)->name().find("AdBlock") != std::string::npos) {
2265 adblock = true; 2265 adblock = true;
2266 } else { 2266 } else {
2267 other = true; 2267 other = true;
2268 } 2268 }
2269 } 2269 }
2270 } 2270 }
2271 2271
2272 host->Send(new ExtensionMsg_UsingWebRequestAPI(adblock, adblock_plus, other)); 2272 host->Send(new ExtensionMsg_UsingWebRequestAPI(adblock, adblock_plus, other));
2273 } 2273 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/app_window_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698