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

Side by Side Diff: chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc

Issue 1417563005: [Extensions] Migrate ServiceWorker off behavior feature system (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | extensions/renderer/dispatcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.h" 5 #include "chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/sha1.h" 8 #include "base/sha1.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "chrome/common/channel_info.h" 10 #include "chrome/common/channel_info.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/renderer/extensions/notifications_native_handler.h" 21 #include "chrome/renderer/extensions/notifications_native_handler.h"
22 #include "chrome/renderer/extensions/page_capture_custom_bindings.h" 22 #include "chrome/renderer/extensions/page_capture_custom_bindings.h"
23 #include "chrome/renderer/extensions/platform_keys_natives.h" 23 #include "chrome/renderer/extensions/platform_keys_natives.h"
24 #include "chrome/renderer/extensions/sync_file_system_custom_bindings.h" 24 #include "chrome/renderer/extensions/sync_file_system_custom_bindings.h"
25 #include "chrome/renderer/extensions/tabs_custom_bindings.h" 25 #include "chrome/renderer/extensions/tabs_custom_bindings.h"
26 #include "chrome/renderer/extensions/webstore_bindings.h" 26 #include "chrome/renderer/extensions/webstore_bindings.h"
27 #include "components/version_info/version_info.h" 27 #include "components/version_info/version_info.h"
28 #include "content/public/common/content_switches.h" 28 #include "content/public/common/content_switches.h"
29 #include "content/public/renderer/render_thread.h" 29 #include "content/public/renderer/render_thread.h"
30 #include "content/public/renderer/render_view.h" 30 #include "content/public/renderer/render_view.h"
31 #include "extensions/common/constants.h"
31 #include "extensions/common/extension.h" 32 #include "extensions/common/extension.h"
32 #include "extensions/common/feature_switch.h" 33 #include "extensions/common/feature_switch.h"
33 #include "extensions/common/permissions/manifest_permission_set.h" 34 #include "extensions/common/permissions/manifest_permission_set.h"
34 #include "extensions/common/permissions/permission_set.h" 35 #include "extensions/common/permissions/permission_set.h"
35 #include "extensions/common/permissions/permissions_data.h" 36 #include "extensions/common/permissions/permissions_data.h"
36 #include "extensions/common/switches.h" 37 #include "extensions/common/switches.h"
37 #include "extensions/renderer/dispatcher.h" 38 #include "extensions/renderer/dispatcher.h"
38 #include "extensions/renderer/native_handler.h" 39 #include "extensions/renderer/native_handler.h"
39 #include "extensions/renderer/resource_bundle_source_map.h" 40 #include "extensions/renderer/resource_bundle_source_map.h"
40 #include "extensions/renderer/script_context.h" 41 #include "extensions/renderer/script_context.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 const std::set<std::string>& extension_ids) { 254 const std::set<std::string>& extension_ids) {
254 // In single-process mode, the browser process reports the active extensions. 255 // In single-process mode, the browser process reports the active extensions.
255 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 256 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
256 ::switches::kSingleProcess)) 257 ::switches::kSingleProcess))
257 return; 258 return;
258 crash_keys::SetActiveExtensions(extension_ids); 259 crash_keys::SetActiveExtensions(extension_ids);
259 } 260 }
260 261
261 void ChromeExtensionsDispatcherDelegate::SetChannel(int channel) { 262 void ChromeExtensionsDispatcherDelegate::SetChannel(int channel) {
262 extensions::SetCurrentChannel(static_cast<version_info::Channel>(channel)); 263 extensions::SetCurrentChannel(static_cast<version_info::Channel>(channel));
264 if (extensions::GetCurrentChannel() == version_info::Channel::UNKNOWN) {
265 // chrome-extension: resources should be allowed to register ServiceWorkers.
266 blink::WebSecurityPolicy::registerURLSchemeAsAllowingServiceWorkers(
267 blink::WebString::fromUTF8(extensions::kExtensionScheme));
268 }
263 } 269 }
OLDNEW
« no previous file with comments | « no previous file | extensions/renderer/dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698