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

Side by Side Diff: extensions/shell/common/shell_extensions_client.cc

Issue 596003002: Allow declarative webrequest and webrequest in extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up RuleRegistry in ExtensionsApiClient. Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/shell/common/shell_extensions_client.h" 5 #include "extensions/shell/common/shell_extensions_client.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "extensions/common/api/generated_schemas.h" 9 #include "extensions/common/api/generated_schemas.h"
10 #include "extensions/common/common_manifest_handlers.h" 10 #include "extensions/common/common_manifest_handlers.h"
11 #include "extensions/common/extension_api.h"
11 #include "extensions/common/extension_urls.h" 12 #include "extensions/common/extension_urls.h"
12 #include "extensions/common/features/api_feature.h" 13 #include "extensions/common/features/api_feature.h"
13 #include "extensions/common/features/base_feature_provider.h" 14 #include "extensions/common/features/base_feature_provider.h"
14 #include "extensions/common/features/json_feature_provider_source.h" 15 #include "extensions/common/features/json_feature_provider_source.h"
15 #include "extensions/common/features/manifest_feature.h" 16 #include "extensions/common/features/manifest_feature.h"
16 #include "extensions/common/features/permission_feature.h" 17 #include "extensions/common/features/permission_feature.h"
17 #include "extensions/common/features/simple_feature.h" 18 #include "extensions/common/features/simple_feature.h"
18 #include "extensions/common/manifest_handler.h" 19 #include "extensions/common/manifest_handler.h"
19 #include "extensions/common/permissions/permission_message_provider.h" 20 #include "extensions/common/permissions/permission_message_provider.h"
20 #include "extensions/common/permissions/permissions_info.h" 21 #include "extensions/common/permissions/permissions_info.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 return core_api::GeneratedSchemas::IsGenerated(name); 175 return core_api::GeneratedSchemas::IsGenerated(name);
175 } 176 }
176 177
177 base::StringPiece ShellExtensionsClient::GetAPISchema( 178 base::StringPiece ShellExtensionsClient::GetAPISchema(
178 const std::string& name) const { 179 const std::string& name) const {
179 return core_api::GeneratedSchemas::Get(name); 180 return core_api::GeneratedSchemas::Get(name);
180 } 181 }
181 182
182 void ShellExtensionsClient::RegisterAPISchemaResources( 183 void ShellExtensionsClient::RegisterAPISchemaResources(
183 ExtensionAPI* api) const { 184 ExtensionAPI* api) const {
185 api->RegisterSchemaResource("declarativeWebRequest",
Ken Rockot(use gerrit already) 2014/09/29 17:22:53 You could also remove these from both ShellExtensi
Xi Han 2014/09/29 18:16:21 Great suggestion! I was considering how to remove
186 IDR_EXTENSION_API_JSON_DECLARATIVE_WEBREQUEST);
187 api->RegisterSchemaResource("webViewRequest",
188 IDR_EXTENSION_API_JSON_WEB_VIEW_REQUEST);
184 } 189 }
185 190
186 bool ShellExtensionsClient::ShouldSuppressFatalErrors() const { 191 bool ShellExtensionsClient::ShouldSuppressFatalErrors() const {
187 return true; 192 return true;
188 } 193 }
189 194
190 std::string ShellExtensionsClient::GetWebstoreBaseURL() const { 195 std::string ShellExtensionsClient::GetWebstoreBaseURL() const {
191 return extension_urls::kChromeWebstoreBaseURL; 196 return extension_urls::kChromeWebstoreBaseURL;
192 } 197 }
193 198
194 std::string ShellExtensionsClient::GetWebstoreUpdateURL() const { 199 std::string ShellExtensionsClient::GetWebstoreUpdateURL() const {
195 return extension_urls::kChromeWebstoreUpdateURL; 200 return extension_urls::kChromeWebstoreUpdateURL;
196 } 201 }
197 202
198 bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const { 203 bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const {
199 // TODO(rockot): Maybe we want to do something else here. For now we accept 204 // TODO(rockot): Maybe we want to do something else here. For now we accept
200 // any URL as a blacklist URL because we don't really care. 205 // any URL as a blacklist URL because we don't really care.
201 return true; 206 return true;
202 } 207 }
203 208
204 } // namespace extensions 209 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698