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

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

Issue 575113002: Move Webstore URL concepts to //extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ENABLE_EXTENSIONS guard in core chrome code 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_permissions.h" 5 #include "chrome/browser/extensions/api/web_request/web_request_permissions.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "chrome/common/extensions/extension_constants.h"
10 #include "content/public/browser/resource_request_info.h" 9 #include "content/public/browser/resource_request_info.h"
11 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h" 10 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h"
12 #include "extensions/browser/info_map.h" 11 #include "extensions/browser/info_map.h"
13 #include "extensions/common/constants.h" 12 #include "extensions/common/constants.h"
14 #include "extensions/common/extension.h" 13 #include "extensions/common/extension.h"
14 #include "extensions/common/extension_urls.h"
15 #include "extensions/common/permissions/permissions_data.h" 15 #include "extensions/common/permissions/permissions_data.h"
16 #include "net/url_request/url_request.h" 16 #include "net/url_request/url_request.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 using content::ResourceRequestInfo; 19 using content::ResourceRequestInfo;
20 20
21 namespace { 21 namespace {
22 22
23 // Returns true if the URL is sensitive and requests to this URL must not be 23 // Returns true if the URL is sensitive and requests to this URL must not be
24 // modified/canceled by extensions, e.g. because it is targeted to the webstore 24 // modified/canceled by extensions, e.g. because it is targeted to the webstore
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 break; 134 break;
135 case REQUIRE_ALL_URLS: 135 case REQUIRE_ALL_URLS:
136 if (!extension->permissions_data()->HasEffectiveAccessToAllHosts()) 136 if (!extension->permissions_data()->HasEffectiveAccessToAllHosts())
137 return false; 137 return false;
138 break; 138 break;
139 } 139 }
140 140
141 return true; 141 return true;
142 } 142 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698