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

Side by Side Diff: ui/base/ime/chromeos/component_extension_ime_manager.cc

Issue 819223002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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
« no previous file with comments | « ui/base/font_helper_chromeos.cc ('k') | ui/base/ime/remote_input_method_win.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 "ui/base/ime/chromeos/component_extension_ime_manager.h" 5 #include "ui/base/ime/chromeos/component_extension_ime_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "chromeos/chromeos_switches.h" 10 #include "chromeos/chromeos_switches.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 158
159 bool ComponentExtensionIMEManager::IsWhitelistedExtension( 159 bool ComponentExtensionIMEManager::IsWhitelistedExtension(
160 const std::string& extension_id) { 160 const std::string& extension_id) {
161 return component_extension_imes_.find(extension_id) != 161 return component_extension_imes_.find(extension_id) !=
162 component_extension_imes_.end(); 162 component_extension_imes_.end();
163 } 163 }
164 164
165 input_method::InputMethodDescriptors 165 input_method::InputMethodDescriptors
166 ComponentExtensionIMEManager::GetAllIMEAsInputMethodDescriptor() { 166 ComponentExtensionIMEManager::GetAllIMEAsInputMethodDescriptor() {
167 bool enable_new_korean_ime = CommandLine::ForCurrentProcess()->HasSwitch( 167 bool enable_new_korean_ime =
168 switches::kEnableNewKoreanIme); 168 base::CommandLine::ForCurrentProcess()->HasSwitch(
169 switches::kEnableNewKoreanIme);
169 input_method::InputMethodDescriptors result; 170 input_method::InputMethodDescriptors result;
170 for (std::map<std::string, ComponentExtensionIME>::const_iterator it = 171 for (std::map<std::string, ComponentExtensionIME>::const_iterator it =
171 component_extension_imes_.begin(); 172 component_extension_imes_.begin();
172 it != component_extension_imes_.end(); ++it) { 173 it != component_extension_imes_.end(); ++it) {
173 const ComponentExtensionIME& ext = it->second; 174 const ComponentExtensionIME& ext = it->second;
174 for (size_t j = 0; j < ext.engines.size(); ++j) { 175 for (size_t j = 0; j < ext.engines.size(); ++j) {
175 const ComponentExtensionEngine& ime = ext.engines[j]; 176 const ComponentExtensionEngine& ime = ext.engines[j];
176 // Filter out new Korean IME if the experimental flag is OFF. 177 // Filter out new Korean IME if the experimental flag is OFF.
177 if (!enable_new_korean_ime && ime.engine_id == "ko-t-i0-und") 178 if (!enable_new_korean_ime && ime.engine_id == "ko-t-i0-und")
178 continue; 179 continue;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 bool ComponentExtensionIMEManager::IsInLoginLayoutWhitelist( 232 bool ComponentExtensionIMEManager::IsInLoginLayoutWhitelist(
232 const std::vector<std::string>& layouts) { 233 const std::vector<std::string>& layouts) {
233 for (size_t i = 0; i < layouts.size(); ++i) { 234 for (size_t i = 0; i < layouts.size(); ++i) {
234 if (login_layout_set_.find(layouts[i]) != login_layout_set_.end()) 235 if (login_layout_set_.find(layouts[i]) != login_layout_set_.end())
235 return true; 236 return true;
236 } 237 }
237 return false; 238 return false;
238 } 239 }
239 240
240 } // namespace chromeos 241 } // namespace chromeos
OLDNEW
« no previous file with comments | « ui/base/font_helper_chromeos.cc ('k') | ui/base/ime/remote_input_method_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698