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

Side by Side Diff: chrome/browser/chromeos/mobile_config.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/mobile_config.h" 5 #include "chrome/browser/chromeos/mobile_config.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 root_.reset(global_config_root.release()); 353 root_.reset(global_config_root.release());
354 } 354 }
355 } 355 }
356 356
357 void MobileConfig::ReadConfigInBackground( 357 void MobileConfig::ReadConfigInBackground(
358 const base::FilePath& global_config_file, 358 const base::FilePath& global_config_file,
359 const base::FilePath& local_config_file) { 359 const base::FilePath& local_config_file) {
360 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 360 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
361 std::string global_config; 361 std::string global_config;
362 std::string local_config; 362 std::string local_config;
363 if (!file_util::ReadFileToString(global_config_file, &global_config)) { 363 if (!base::ReadFileToString(global_config_file, &global_config)) {
364 VLOG(1) << "Failed to load global mobile config from: " 364 VLOG(1) << "Failed to load global mobile config from: "
365 << global_config_file.value(); 365 << global_config_file.value();
366 } 366 }
367 if (!file_util::ReadFileToString(local_config_file, &local_config)) { 367 if (!base::ReadFileToString(local_config_file, &local_config)) {
368 VLOG(1) << "Failed to load local mobile config from: " 368 VLOG(1) << "Failed to load local mobile config from: "
369 << local_config_file.value(); 369 << local_config_file.value();
370 } 370 }
371 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 371 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
372 base::Bind(&MobileConfig::ProcessConfig, 372 base::Bind(&MobileConfig::ProcessConfig,
373 base::Unretained(this), // singleton. 373 base::Unretained(this), // singleton.
374 global_config, 374 global_config,
375 local_config)); 375 local_config));
376 } 376 }
377 377
378 } // namespace chromeos 378 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/mobile/mobile_activator.cc ('k') | chrome/browser/chromeos/policy/device_local_account_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698