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

Unified Diff: chromeos/ime/ibus_daemon_controller.cc

Issue 67923002: Fixes for -Wunused-function on Linux, Android and ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for realz Created 7 years, 1 month 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 | « chromeos/dbus/fake_shill_service_client.cc ('k') | chromeos/network/onc/onc_validator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/ime/ibus_daemon_controller.cc
diff --git a/chromeos/ime/ibus_daemon_controller.cc b/chromeos/ime/ibus_daemon_controller.cc
index 01cd5835ade539d9e03134bd9857910a519a7c82..7febb2baf99746461e3790388fd144c468edf671 100644
--- a/chromeos/ime/ibus_daemon_controller.cc
+++ b/chromeos/ime/ibus_daemon_controller.cc
@@ -17,41 +17,6 @@ namespace chromeos {
namespace {
IBusDaemonController* g_ibus_daemon_controller = NULL;
-base::FilePathWatcher* g_file_path_watcher = NULL;
-
-// Called when the ibus-daemon address file is modified.
-static void OnFilePathChanged(
- const scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
- const base::Closure& closure,
- const base::FilePath& file_path,
- bool failed) {
- if (failed)
- return; // Can't recover, do nothing.
- if (!g_file_path_watcher)
- return; // Already discarded watch task.
-
- ui_task_runner->PostTask(FROM_HERE, closure);
- ui_task_runner->DeleteSoon(FROM_HERE, g_file_path_watcher);
- g_file_path_watcher = NULL;
-}
-
-// Start watching |address_file_path|. If the target file is changed, |callback|
-// is called on UI thread. This function should be called on FILE thread.
-void StartWatch(
- const std::string& address_file_path,
- const base::Closure& closure,
- const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner) {
- // Before start watching, discard on-going watching task.
- delete g_file_path_watcher;
- g_file_path_watcher = new base::FilePathWatcher;
- bool result = g_file_path_watcher->Watch(
- base::FilePath::FromUTF8Unsafe(address_file_path),
- false, // do not watch child directory.
- base::Bind(&OnFilePathChanged,
- ui_task_runner,
- closure));
- DCHECK(result);
-}
// An implementation of IBusDaemonController without ibus-daemon interaction.
// Currently this class is used only on linux desktop.
« no previous file with comments | « chromeos/dbus/fake_shill_service_client.cc ('k') | chromeos/network/onc/onc_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698