| OLD | NEW |
| 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 "chrome/browser/chromeos/input_method/component_extension_ime_manager_i
mpl.h" | 5 #include "chrome/browser/chromeos/input_method/component_extension_ime_manager_i
mpl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/json/json_string_value_serializer.h" | 10 #include "base/json/json_string_value_serializer.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 if (!manifest.get()) | 159 if (!manifest.get()) |
| 160 LOG(ERROR) << "Failed at getting manifest"; | 160 LOG(ERROR) << "Failed at getting manifest"; |
| 161 | 161 |
| 162 return scoped_ptr<base::DictionaryValue>( | 162 return scoped_ptr<base::DictionaryValue>( |
| 163 static_cast<base::DictionaryValue*>(manifest.release())).Pass(); | 163 static_cast<base::DictionaryValue*>(manifest.release())).Pass(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 // static | 166 // static |
| 167 bool ComponentExtensionIMEManagerImpl::IsIMEExtensionID(const std::string& id) { | 167 bool ComponentExtensionIMEManagerImpl::IsIMEExtensionID(const std::string& id) { |
| 168 for (size_t i = 0; i < arraysize(whitelisted_component_extension); ++i) { | 168 for (size_t i = 0; i < arraysize(whitelisted_component_extension); ++i) { |
| 169 if (LowerCaseEqualsASCII(id, whitelisted_component_extension[i].id)) | 169 if (base::LowerCaseEqualsASCII(id, whitelisted_component_extension[i].id)) |
| 170 return true; | 170 return true; |
| 171 } | 171 } |
| 172 return false; | 172 return false; |
| 173 } | 173 } |
| 174 | 174 |
| 175 // static | 175 // static |
| 176 bool ComponentExtensionIMEManagerImpl::ReadEngineComponent( | 176 bool ComponentExtensionIMEManagerImpl::ReadEngineComponent( |
| 177 const ComponentExtensionIME& component_extension, | 177 const ComponentExtensionIME& component_extension, |
| 178 const base::DictionaryValue& dict, | 178 const base::DictionaryValue& dict, |
| 179 ComponentExtensionEngine* out) { | 179 ComponentExtensionEngine* out) { |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 | 318 |
| 319 ComponentExtensionEngine engine; | 319 ComponentExtensionEngine engine; |
| 320 ReadEngineComponent(component_ime, *dictionary, &engine); | 320 ReadEngineComponent(component_ime, *dictionary, &engine); |
| 321 component_ime.engines.push_back(engine); | 321 component_ime.engines.push_back(engine); |
| 322 } | 322 } |
| 323 out_imes->push_back(component_ime); | 323 out_imes->push_back(component_ime); |
| 324 } | 324 } |
| 325 } | 325 } |
| 326 | 326 |
| 327 } // namespace chromeos | 327 } // namespace chromeos |
| OLD | NEW |