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

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

Issue 7002005: Use chromeos::CrosLibrary::Get()->EnsureLoaded() to replace chromeos::LoadLibcros() (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_input_ui_api.cc
diff --git a/chrome/browser/extensions/extension_input_ui_api.cc b/chrome/browser/extensions/extension_input_ui_api.cc
index 11f7c14a04a40735be2e6f24b3d5e60b45de5cb7..4da954bf3d3b5bdece5e33d82bd38e9316fe07e3 100644
--- a/chrome/browser/extensions/extension_input_ui_api.cc
+++ b/chrome/browser/extensions/extension_input_ui_api.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/string_util.h"
#include "base/values.h"
+#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/extensions/extension_event_router.h"
#include "chrome/browser/profiles/profile.h"
#include "third_party/cros/chromeos_cros_api.h"
@@ -77,8 +78,8 @@ InputUiController::InputUiController(
ExtensionInputUiEventRouter* router) :
router_(router),
ui_status_connection_(NULL) {
- std::string error;
- chromeos::LoadLibcros(NULL, error);
+ if (!chromeos::CrosLibrary::Get()->EnsureLoaded())
+ return;
chromeos::InputMethodUiStatusMonitorFunctions functions;
functions.hide_auxiliary_text =
@@ -98,7 +99,8 @@ InputUiController::InputUiController(
}
InputUiController::~InputUiController() {
- chromeos::DisconnectInputMethodUiStatus(ui_status_connection_);
+ if (ui_status_connection_)
+ chromeos::DisconnectInputMethodUiStatus(ui_status_connection_);
}
void InputUiController::CandidateClicked(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698