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

Unified Diff: chrome/renderer/extensions/dispatcher.cc

Issue 22299009: Move channel-related (Chrome-specific) global state out of Feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/extensions/dispatcher.cc
diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc
index 3b2c3efdd37651f99f33890651c8850ee755da35..e91ee32447ea95c1496675a66f246d10c4598c78 100644
--- a/chrome/renderer/extensions/dispatcher.cc
+++ b/chrome/renderer/extensions/dispatcher.cc
@@ -25,6 +25,7 @@
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/common/extensions/features/base_feature_provider.h"
#include "chrome/common/extensions/features/feature.h"
+#include "chrome/common/extensions/features/feature_channel.h"
#include "chrome/common/extensions/manifest.h"
#include "chrome/common/extensions/manifest_handlers/externally_connectable.h"
#include "chrome/common/extensions/manifest_handlers/sandboxed_page_info.h"
@@ -507,7 +508,7 @@ void Dispatcher::OnSetSystemFont(const std::string& font_family,
}
void Dispatcher::OnSetChannel(int channel) {
- Feature::SetCurrentChannel(
+ extensions::SetCurrentChannel(
static_cast<chrome::VersionInfo::Channel>(channel));
}
@@ -1084,7 +1085,7 @@ void Dispatcher::DidCreateScriptContext(
if (context_type == Feature::BLESSED_EXTENSION_CONTEXT &&
is_within_platform_app &&
- Feature::GetCurrentChannel() <= chrome::VersionInfo::CHANNEL_DEV &&
+ GetCurrentChannel() <= chrome::VersionInfo::CHANNEL_DEV &&
CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableAppWindowControls)) {
module_system->Require("windowControls");
@@ -1100,7 +1101,7 @@ void Dispatcher::DidCreateScriptContext(
if (extension->HasAPIPermission(APIPermission::kWebView)) {
module_system->Require("webView");
bool includeExperimental =
- Feature::GetCurrentChannel() <= chrome::VersionInfo::CHANNEL_DEV ||
+ GetCurrentChannel() <= chrome::VersionInfo::CHANNEL_DEV ||
extension->id() == extension_misc::kIdentityApiUiAppId;
if (!includeExperimental) {
// TODO(asargent) We need a whitelist for webview experimental.
« no previous file with comments | « chrome/common/extensions/permissions/permissions_data_unittest.cc ('k') | chrome/renderer/extensions/module_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698