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

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

Issue 986503004: Some cleanup in extensions/renderer/dispatcher.cc . (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« 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/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 // Note: setting up the WebView class here, not the chrome.webview API. 240 // Note: setting up the WebView class here, not the chrome.webview API.
241 // The API will be automatically set up when first used. 241 // The API will be automatically set up when first used.
242 if (context->GetAvailability("webViewInternal").is_available()) { 242 if (context->GetAvailability("webViewInternal").is_available()) {
243 module_system->Require("chromeWebView"); 243 module_system->Require("chromeWebView");
244 if (context->GetAvailability("webViewExperimentalInternal") 244 if (context->GetAvailability("webViewExperimentalInternal")
245 .is_available()) { 245 .is_available()) {
246 module_system->Require("chromeWebViewExperimental"); 246 module_system->Require("chromeWebViewExperimental");
247 } 247 }
248 } 248 }
249
250 if (context->GetAvailability("extensionOptionsInternal").is_available()) {
251 module_system->Require("extensionOptions");
252 }
253 } 249 }
254 250
255 void ChromeExtensionsDispatcherDelegate::OnActiveExtensionsUpdated( 251 void ChromeExtensionsDispatcherDelegate::OnActiveExtensionsUpdated(
256 const std::set<std::string>& extension_ids) { 252 const std::set<std::string>& extension_ids) {
257 // In single-process mode, the browser process reports the active extensions. 253 // In single-process mode, the browser process reports the active extensions.
258 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 254 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
259 ::switches::kSingleProcess)) 255 ::switches::kSingleProcess))
260 return; 256 return;
261 crash_keys::SetActiveExtensions(extension_ids); 257 crash_keys::SetActiveExtensions(extension_ids);
262 } 258 }
263 259
264 void ChromeExtensionsDispatcherDelegate::SetChannel(int channel) { 260 void ChromeExtensionsDispatcherDelegate::SetChannel(int channel) {
265 extensions::SetCurrentChannel( 261 extensions::SetCurrentChannel(
266 static_cast<chrome::VersionInfo::Channel>(channel)); 262 static_cast<chrome::VersionInfo::Channel>(channel));
267 } 263 }
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