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

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

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 component_ime.path = base::FilePath( 250 component_ime.path = base::FilePath(
251 whitelisted_component_extension[i].path); 251 whitelisted_component_extension[i].path);
252 252
253 const base::FilePath manifest_path = 253 const base::FilePath manifest_path =
254 component_ime.path.Append("manifest.json"); 254 component_ime.path.Append("manifest.json");
255 255
256 if (!base::PathExists(component_ime.path) || 256 if (!base::PathExists(component_ime.path) ||
257 !base::PathExists(manifest_path)) 257 !base::PathExists(manifest_path))
258 continue; 258 continue;
259 259
260 if (!file_util::ReadFileToString(manifest_path, &component_ime.manifest)) 260 if (!base::ReadFileToString(manifest_path, &component_ime.manifest))
261 continue; 261 continue;
262 262
263 scoped_ptr<DictionaryValue> manifest = GetManifest(component_ime.path); 263 scoped_ptr<DictionaryValue> manifest = GetManifest(component_ime.path);
264 if (!manifest.get()) 264 if (!manifest.get())
265 continue; 265 continue;
266 266
267 if (!ReadExtensionInfo(*manifest.get(), 267 if (!ReadExtensionInfo(*manifest.get(),
268 whitelisted_component_extension[i].id, 268 whitelisted_component_extension[i].id,
269 &component_ime)) 269 &component_ime))
270 continue; 270 continue;
(...skipping 21 matching lines...) Expand all
292 std::vector<ComponentExtensionIME>* result, 292 std::vector<ComponentExtensionIME>* result,
293 const base::Closure& callback) { 293 const base::Closure& callback) {
294 DCHECK(thread_checker_.CalledOnValidThread()); 294 DCHECK(thread_checker_.CalledOnValidThread());
295 DCHECK(result); 295 DCHECK(result);
296 component_extension_list_ = *result; 296 component_extension_list_ = *result;
297 is_initialized_ = true; 297 is_initialized_ = true;
298 callback.Run(); 298 callback.Run();
299 } 299 }
300 300
301 } // namespace chromeos 301 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/external_metrics.cc ('k') | chrome/browser/chromeos/login/kiosk_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698