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

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

Issue 658183003: [Athena] Hotfix for IME component extension loading crash on sign in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove debug code. Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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 "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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 return extension_service->component_loader(); 247 return extension_service->component_loader();
248 } 248 }
249 249
250 void DoLoadExtension(Profile* profile, 250 void DoLoadExtension(Profile* profile,
251 const std::string& extension_id, 251 const std::string& extension_id,
252 const std::string& manifest, 252 const std::string& manifest,
253 const base::FilePath& file_path) { 253 const base::FilePath& file_path) {
254 extensions::ExtensionSystem* extension_system = 254 extensions::ExtensionSystem* extension_system =
255 extensions::ExtensionSystem::Get(profile); 255 extensions::ExtensionSystem::Get(profile);
256 ExtensionService* extension_service = extension_system->extension_service(); 256 ExtensionService* extension_service = extension_system->extension_service();
257 #if defined(USE_ATHENA)
258 // ExtensionService is not properly initialized for Athena yet.
259 // http://crbug.com/426787
260 if (!extension_service)
261 return;
262 #endif
263 DCHECK(extension_service);
257 if (extension_service->GetExtensionById(extension_id, false)) 264 if (extension_service->GetExtensionById(extension_id, false))
258 return; 265 return;
259 const std::string loaded_extension_id = 266 const std::string loaded_extension_id =
260 GetComponentLoader(profile)->Add(manifest, file_path); 267 GetComponentLoader(profile)->Add(manifest, file_path);
261 DCHECK_EQ(loaded_extension_id, extension_id); 268 DCHECK_EQ(loaded_extension_id, extension_id);
262 } 269 }
263 270
264 bool CheckFilePath(const base::FilePath* file_path) { 271 bool CheckFilePath(const base::FilePath* file_path) {
265 return base::PathExists(*file_path); 272 return base::PathExists(*file_path);
266 } 273 }
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 502
496 ComponentExtensionEngine engine; 503 ComponentExtensionEngine engine;
497 ReadEngineComponent(component_ime, *dictionary, &engine); 504 ReadEngineComponent(component_ime, *dictionary, &engine);
498 component_ime.engines.push_back(engine); 505 component_ime.engines.push_back(engine);
499 } 506 }
500 out_imes->push_back(component_ime); 507 out_imes->push_back(component_ime);
501 } 508 }
502 } 509 }
503 510
504 } // namespace chromeos 511 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698