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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_manager.cc

Issue 7633055: base: Fix the TODO in string_util.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chrome_mini_installer.cc Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/bug_report_util.cc ('k') | chrome/browser/chromeos/input_method/xkeyboard.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 5 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include <glib.h> 9 #include <glib.h>
10 10
11 #include "unicode/uloc.h" 11 #include "unicode/uloc.h"
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/memory/singleton.h" 14 #include "base/memory/singleton.h"
15 #include "base/message_loop.h" 15 #include "base/message_loop.h"
16 #include "base/process_util.h" 16 #include "base/process_util.h"
17 #include "base/string_split.h" 17 #include "base/string_split.h"
18 #include "base/string_util.h" 18 #include "base/string_util.h"
19 #include "base/stringprintf.h"
19 #include "chrome/browser/browser_process.h" 20 #include "chrome/browser/browser_process.h"
20 #include "chrome/browser/chromeos/cros/cros_library.h" 21 #include "chrome/browser/chromeos/cros/cros_library.h"
21 #include "chrome/browser/chromeos/input_method/input_method_util.h" 22 #include "chrome/browser/chromeos/input_method/input_method_util.h"
22 #include "chrome/browser/chromeos/input_method/virtual_keyboard_selector.h" 23 #include "chrome/browser/chromeos/input_method/virtual_keyboard_selector.h"
23 #include "chrome/browser/chromeos/input_method/xkeyboard.h" 24 #include "chrome/browser/chromeos/input_method/xkeyboard.h"
24 #include "chrome/browser/chromeos/language_preferences.h" 25 #include "chrome/browser/chromeos/language_preferences.h"
25 #include "content/browser/browser_thread.h" 26 #include "content/browser/browser_thread.h"
26 #include "content/common/notification_observer.h" 27 #include "content/common/notification_observer.h"
27 #include "content/common/notification_registrar.h" 28 #include "content/common/notification_registrar.h"
28 #include "content/common/notification_service.h" 29 #include "content/common/notification_service.h"
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 } 835 }
835 } 836 }
836 #endif 837 #endif
837 838
838 if (ibus_daemon_process_handle_ != base::kNullProcessHandle) { 839 if (ibus_daemon_process_handle_ != base::kNullProcessHandle) {
839 return false; // ibus-daemon is already running. 840 return false; // ibus-daemon is already running.
840 } 841 }
841 842
842 // TODO(zork): Send output to /var/log/ibus.log 843 // TODO(zork): Send output to /var/log/ibus.log
843 const std::string ibus_daemon_command_line = 844 const std::string ibus_daemon_command_line =
844 StringPrintf("%s --panel=disable --cache=none --restart --replace", 845 base::StringPrintf(
845 kIBusDaemonPath); 846 "%s --panel=disable --cache=none --restart --replace",
847 kIBusDaemonPath);
846 if (!LaunchInputMethodProcess( 848 if (!LaunchInputMethodProcess(
847 ibus_daemon_command_line, &ibus_daemon_process_handle_)) { 849 ibus_daemon_command_line, &ibus_daemon_process_handle_)) {
848 LOG(ERROR) << "Failed to launch " << ibus_daemon_command_line; 850 LOG(ERROR) << "Failed to launch " << ibus_daemon_command_line;
849 return false; 851 return false;
850 } 852 }
851 return true; 853 return true;
852 } 854 }
853 855
854 // Called when the input method process is shut down. 856 // Called when the input method process is shut down.
855 static void OnImeShutdown(GPid pid, 857 static void OnImeShutdown(GPid pid,
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 return InputMethodManagerImpl::GetInstance(); 983 return InputMethodManagerImpl::GetInstance();
982 } 984 }
983 985
984 } // namespace input_method 986 } // namespace input_method
985 } // namespace chromeos 987 } // namespace chromeos
986 988
987 // Allows InvokeLater without adding refcounting. This class is a Singleton and 989 // Allows InvokeLater without adding refcounting. This class is a Singleton and
988 // won't be deleted until it's last InvokeLater is run. 990 // won't be deleted until it's last InvokeLater is run.
989 DISABLE_RUNNABLE_METHOD_REFCOUNT( 991 DISABLE_RUNNABLE_METHOD_REFCOUNT(
990 chromeos::input_method::InputMethodManagerImpl); 992 chromeos::input_method::InputMethodManagerImpl);
OLDNEW
« no previous file with comments | « chrome/browser/bug_report_util.cc ('k') | chrome/browser/chromeos/input_method/xkeyboard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698