Hack to restrict runtime API to dev channel rather than experimental.

BUG=124167
TEST=no

Review URL: https://chromiumcodereview.appspot.com/10310182

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137566 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/api/runtime/runtime_api.cc b/chrome/browser/extensions/api/runtime/runtime_api.cc
index 3142565..64106fec 100644
--- a/chrome/browser/extensions/api/runtime/runtime_api.cc
+++ b/chrome/browser/extensions/api/runtime/runtime_api.cc
@@ -15,7 +15,7 @@
 
 namespace {
 
-const char kOnInstalledEvent[] = "experimental.runtime.onInstalled";
+const char kOnInstalledEvent[] = "runtime.onInstalled";
 const char kNoBackgroundPageError[] = "You do not have a background page.";
 const char kPageLoadError[] = "Background page failed to load.";
 
diff --git a/chrome/browser/extensions/api/runtime/runtime_api.h b/chrome/browser/extensions/api/runtime/runtime_api.h
index c2096d3..9b2f10e5 100644
--- a/chrome/browser/extensions/api/runtime/runtime_api.h
+++ b/chrome/browser/extensions/api/runtime/runtime_api.h
@@ -24,7 +24,7 @@
 class RuntimeGetBackgroundPageFunction : public AsyncExtensionFunction {
  protected:
   virtual bool RunImpl() OVERRIDE;
-  DECLARE_EXTENSION_FUNCTION_NAME("experimental.runtime.getBackgroundPage");
+  DECLARE_EXTENSION_FUNCTION_NAME("runtime.getBackgroundPage");
  private:
   void OnPageLoaded(ExtensionHost*);
 };
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 13d5825d..d221c40 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -87,6 +87,7 @@
 #include "chrome/common/chrome_notification_types.h"
 #include "chrome/common/chrome_paths.h"
 #include "chrome/common/chrome_switches.h"
+#include "chrome/common/chrome_version_info.h"
 #include "chrome/common/extensions/extension.h"
 #include "chrome/common/extensions/extension_error_utils.h"
 #include "chrome/common/extensions/extension_file_util.h"
@@ -2379,6 +2380,10 @@
       if (!profile_->IsSameProfile(host_profile->GetOriginalProfile()))
           break;
 
+      // Extensions need to know the channel for API restrictions.
+      process->Send(new ExtensionMsg_SetChannel(
+          chrome::VersionInfo::GetChannel()));
+
       // Valid extension function names, used to setup bindings in renderer.
       std::vector<std::string> function_names;
       ExtensionFunctionDispatcher::GetAllFunctionNames(&function_names);