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

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

Issue 899983002: Revert of 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: rebase 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,
518 const Extension* extension, 517 const Extension* extension,
519 const base::Value& json_action, 518 const base::Value& json_action,
520 std::string* error, 519 std::string* error,
521 bool* bad_message) { 520 bool* bad_message) {
522 *error = ""; 521 *error = "";
523 *bad_message = false; 522 *bad_message = false;
524 523
525 const base::DictionaryValue* action_dict = NULL; 524 const base::DictionaryValue* action_dict = NULL;
526 INPUT_FORMAT_VALIDATE(json_action.GetAsDictionary(&action_dict)); 525 INPUT_FORMAT_VALIDATE(json_action.GetAsDictionary(&action_dict));
527 526
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 const base::Time& extension_install_time) const { 1160 const base::Time& extension_install_time) const {
1162 CHECK(request_data.stage & stages()); 1161 CHECK(request_data.stage & stages());
1163 LinkedPtrEventResponseDelta result( 1162 LinkedPtrEventResponseDelta result(
1164 new extension_web_request_api_helpers::EventResponseDelta( 1163 new extension_web_request_api_helpers::EventResponseDelta(
1165 extension_id, extension_install_time)); 1164 extension_id, extension_install_time));
1166 result->messages_to_extension.insert(message_); 1165 result->messages_to_extension.insert(message_);
1167 return result; 1166 return result;
1168 } 1167 }
1169 1168
1170 } // namespace extensions 1169 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698