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

Side by Side Diff: extensions/browser/api/declarative_webrequest/webrequest_action.cc

Issue 822453002: Introduce HostID and de-couple Extensions from "script injection System" [browser side] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 10 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 "extensions/browser/api/declarative_webrequest/webrequest_action.h" 5 #include "extensions/browser/api/declarative_webrequest/webrequest_action.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 break; 507 break;
508 } 508 }
509 return WebRequestPermissions::CanExtensionAccessURL( 509 return WebRequestPermissions::CanExtensionAccessURL(
510 extension_info_map, extension_id, request->url(), crosses_incognito, 510 extension_info_map, extension_id, request->url(), crosses_incognito,
511 permission_check); 511 permission_check);
512 } 512 }
513 513
514 // static 514 // static
515 scoped_refptr<const WebRequestAction> WebRequestAction::Create( 515 scoped_refptr<const WebRequestAction> WebRequestAction::Create(
516 content::BrowserContext* browser_context, 516 content::BrowserContext* browser_context,
517 const HostID& host_id,
517 const Extension* extension, 518 const Extension* extension,
518 const base::Value& json_action, 519 const base::Value& json_action,
519 std::string* error, 520 std::string* error,
520 bool* bad_message) { 521 bool* bad_message) {
521 *error = ""; 522 *error = "";
522 *bad_message = false; 523 *bad_message = false;
523 524
524 const base::DictionaryValue* action_dict = NULL; 525 const base::DictionaryValue* action_dict = NULL;
525 INPUT_FORMAT_VALIDATE(json_action.GetAsDictionary(&action_dict)); 526 INPUT_FORMAT_VALIDATE(json_action.GetAsDictionary(&action_dict));
526 527
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 const base::Time& extension_install_time) const { 1161 const base::Time& extension_install_time) const {
1161 CHECK(request_data.stage & stages()); 1162 CHECK(request_data.stage & stages());
1162 LinkedPtrEventResponseDelta result( 1163 LinkedPtrEventResponseDelta result(
1163 new extension_web_request_api_helpers::EventResponseDelta( 1164 new extension_web_request_api_helpers::EventResponseDelta(
1164 extension_id, extension_install_time)); 1165 extension_id, extension_install_time));
1165 result->messages_to_extension.insert(message_); 1166 result->messages_to_extension.insert(message_);
1166 return result; 1167 return result;
1167 } 1168 }
1168 1169
1169 } // namespace extensions 1170 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698