OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/extensions/api/web_request/chrome_web_request_permissio
ns_delegate.h" |
| 6 |
| 7 #include "chrome/common/extensions/extension_constants.h" |
| 8 |
| 9 ChromeWebRequestPermissionsDelegate::ChromeWebRequestPermissionsDelegate() { |
| 10 } |
| 11 |
| 12 ChromeWebRequestPermissionsDelegate:: ~ChromeWebRequestPermissionsDelegate() { |
| 13 } |
| 14 |
| 15 bool ChromeWebRequestPermissionsDelegate::IsUpdateURL(const GURL& url) { |
| 16 GURL::Replacements replacements; |
| 17 replacements.ClearQuery(); |
| 18 replacements.ClearRef(); |
| 19 GURL url_without_query = url.ReplaceComponents(replacements); |
| 20 return extension_urls::IsWebstoreUpdateUrl(url_without_query) || |
| 21 extension_urls::IsBlacklistUpdateUrl(url); |
| 22 } |
| 23 |
| 24 bool ChromeWebRequestPermissionsDelegate::ContainsWebStoreAppId( |
| 25 const extensions::ProcessMap& process_map, int process_id) { |
| 26 return process_map.Contains(extension_misc::kWebStoreAppId, process_id); |
| 27 } |
OLD | NEW |