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

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

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
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 "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/extensions/component_loader.h" 9 #include "chrome/browser/extensions/component_loader.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); 233 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
234 DCHECK(out_imes); 234 DCHECK(out_imes);
235 for (size_t i = 0; i < arraysize(whitelisted_component_extension); ++i) { 235 for (size_t i = 0; i < arraysize(whitelisted_component_extension); ++i) {
236 ComponentExtensionIME component_ime; 236 ComponentExtensionIME component_ime;
237 component_ime.path = base::FilePath( 237 component_ime.path = base::FilePath(
238 whitelisted_component_extension[i].path); 238 whitelisted_component_extension[i].path);
239 239
240 const base::FilePath manifest_path = 240 const base::FilePath manifest_path =
241 component_ime.path.Append("manifest.json"); 241 component_ime.path.Append("manifest.json");
242 242
243 if (!file_util::PathExists(component_ime.path) || 243 if (!base::PathExists(component_ime.path) ||
244 !file_util::PathExists(manifest_path)) 244 !base::PathExists(manifest_path))
245 continue; 245 continue;
246 246
247 if (!file_util::ReadFileToString(manifest_path, &component_ime.manifest)) 247 if (!file_util::ReadFileToString(manifest_path, &component_ime.manifest))
248 continue; 248 continue;
249 249
250 scoped_ptr<DictionaryValue> manifest = GetManifest(component_ime.path); 250 scoped_ptr<DictionaryValue> manifest = GetManifest(component_ime.path);
251 if (!manifest.get()) 251 if (!manifest.get())
252 continue; 252 continue;
253 253
254 if (!ReadExtensionInfo(*manifest.get(), 254 if (!ReadExtensionInfo(*manifest.get(),
(...skipping 24 matching lines...) Expand all
279 std::vector<ComponentExtensionIME>* result, 279 std::vector<ComponentExtensionIME>* result,
280 const base::Closure& callback) { 280 const base::Closure& callback) {
281 DCHECK(thread_checker_.CalledOnValidThread()); 281 DCHECK(thread_checker_.CalledOnValidThread());
282 DCHECK(result); 282 DCHECK(result);
283 component_extension_list_ = *result; 283 component_extension_list_ = *result;
284 is_initialized_ = true; 284 is_initialized_ = true;
285 callback.Run(); 285 callback.Run();
286 } 286 }
287 287
288 } // namespace chromeos 288 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/wallpaper_private_api.cc ('k') | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698