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

Side by Side Diff: chromeos/ime/extension_ime_util.cc

Issue 16739011: Use a direct include of strings headers in chromeos/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | « chromeos/ime/component_extension_ime_manager.cc ('k') | chromeos/ime/ibus_daemon_controller.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chromeos/ime/extension_ime_util.h" 5 #include "chromeos/ime/extension_ime_util.h"
6 6
7 #include "base/string_util.h" 7 #include "base/strings/string_util.h"
8 8
9 namespace chromeos { 9 namespace chromeos {
10 namespace { 10 namespace {
11 const char* kExtensionIMEPrefix = "_ext_ime_"; 11 const char* kExtensionIMEPrefix = "_ext_ime_";
12 } // namespace 12 } // namespace
13 13
14 namespace extension_ime_util { 14 namespace extension_ime_util {
15 std::string GetInputMethodID(const std::string& extension_id, 15 std::string GetInputMethodID(const std::string& extension_id,
16 const std::string& engine_id) { 16 const std::string& engine_id) {
17 DCHECK(!extension_id.empty()); 17 DCHECK(!extension_id.empty());
18 DCHECK(!engine_id.empty()); 18 DCHECK(!engine_id.empty());
19 return kExtensionIMEPrefix + extension_id + engine_id; 19 return kExtensionIMEPrefix + extension_id + engine_id;
20 } 20 }
21 21
22 bool IsExtensionIME(const std::string& input_method_id) { 22 bool IsExtensionIME(const std::string& input_method_id) {
23 return StartsWithASCII(input_method_id, 23 return StartsWithASCII(input_method_id,
24 kExtensionIMEPrefix, 24 kExtensionIMEPrefix,
25 true); // Case sensitive. 25 true); // Case sensitive.
26 } 26 }
27 27
28 bool IsMemberOfExtension(const std::string& input_method_id, 28 bool IsMemberOfExtension(const std::string& input_method_id,
29 const std::string& extension_id) { 29 const std::string& extension_id) {
30 return StartsWithASCII(input_method_id, 30 return StartsWithASCII(input_method_id,
31 kExtensionIMEPrefix + extension_id, 31 kExtensionIMEPrefix + extension_id,
32 true); // Case sensitive. 32 true); // Case sensitive.
33 } 33 }
34 34
35 } // namespace extension_ime_util 35 } // namespace extension_ime_util
36 } // namespace chromeos 36 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/ime/component_extension_ime_manager.cc ('k') | chromeos/ime/ibus_daemon_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698