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

Unified Diff: chrome/browser/extensions/extension_input_method_api.cc

Issue 9317013: Add a centralized mechanism for whitelisting access to extension permissions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: . Created 8 years, 10 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/browser/extensions/extension_input_method_api.cc
diff --git a/chrome/browser/extensions/extension_input_method_api.cc b/chrome/browser/extensions/extension_input_method_api.cc
index cf2bbd294a7797e3dd785d0a8fb24fd7406cc315..904c292d055099c90f2ee6b98801489555921727 100644
--- a/chrome/browser/extensions/extension_input_method_api.cc
+++ b/chrome/browser/extensions/extension_input_method_api.cc
@@ -10,12 +10,6 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
-namespace {
-
-const char kErrorInputMethodPrivateApi[] = "Input method API is private";
-
-} // namespace
-
GetInputMethodFunction::GetInputMethodFunction() {
}
@@ -24,15 +18,10 @@ GetInputMethodFunction::~GetInputMethodFunction() {
bool GetInputMethodFunction::RunImpl() {
#if !defined(OS_CHROMEOS)
- error_ = kErrorInputMethodPrivateApi;
- return false;
+ NOTREACHED();
#else
chromeos::ExtensionInputMethodEventRouter* router =
profile_->GetExtensionService()->input_method_event_router();
- if (!router->IsExtensionWhitelisted(extension_id())) {
- error_ = kErrorInputMethodPrivateApi;
- return false;
- }
chromeos::input_method::InputMethodManager* manager =
chromeos::input_method::InputMethodManager::GetInstance();
const std::string input_method =

Powered by Google App Engine
This is Rietveld 408576698