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

Side by Side Diff: chrome/browser/chromeos/login/managed/locally_managed_user_login_flow.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/login/managed/locally_managed_user_login_flow. h" 5 #include "chrome/browser/chromeos/login/managed/locally_managed_user_login_flow. h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
(...skipping 12 matching lines...) Expand all
23 using content::BrowserThread; 23 using content::BrowserThread;
24 24
25 namespace chromeos { 25 namespace chromeos {
26 26
27 namespace { 27 namespace {
28 28
29 std::string LoadSyncToken() { 29 std::string LoadSyncToken() {
30 std::string token; 30 std::string token;
31 base::FilePath token_file = 31 base::FilePath token_file =
32 file_util::GetHomeDir().Append(kManagedUserTokenFilename); 32 file_util::GetHomeDir().Append(kManagedUserTokenFilename);
33 if (!file_util::ReadFileToString(token_file, &token)) { 33 if (!base::ReadFileToString(token_file, &token)) {
34 return std::string(); 34 return std::string();
35 } 35 }
36 return token; 36 return token;
37 } 37 }
38 38
39 } // namespace 39 } // namespace
40 40
41 LocallyManagedUserLoginFlow::LocallyManagedUserLoginFlow( 41 LocallyManagedUserLoginFlow::LocallyManagedUserLoginFlow(
42 const std::string& user_id) 42 const std::string& user_id)
43 : ExtendedUserFlow(user_id), 43 : ExtendedUserFlow(user_id),
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 base::Bind(&LoadSyncToken), 94 base::Bind(&LoadSyncToken),
95 base::Bind( 95 base::Bind(
96 &LocallyManagedUserLoginFlow::OnSyncSetupDataLoaded, 96 &LocallyManagedUserLoginFlow::OnSyncSetupDataLoaded,
97 weak_factory_.GetWeakPtr())); 97 weak_factory_.GetWeakPtr()));
98 } else { 98 } else {
99 ConfigureSync(token); 99 ConfigureSync(token);
100 } 100 }
101 } 101 }
102 102
103 } // namespace chromeos 103 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/kiosk_browsertest.cc ('k') | chrome/browser/chromeos/login/oobe_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698