OLD | NEW |
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/login/supervised_user_manager_impl.h" | 5 #include "chrome/browser/chromeos/login/supervised_user_manager_impl.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/prefs/pref_registry_simple.h" | 9 #include "base/prefs/pref_registry_simple.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 return *it; | 327 return *it; |
328 } | 328 } |
329 } | 329 } |
330 return NULL; | 330 return NULL; |
331 } | 331 } |
332 | 332 |
333 void SupervisedUserManagerImpl::StartCreationTransaction( | 333 void SupervisedUserManagerImpl::StartCreationTransaction( |
334 const base::string16& display_name) { | 334 const base::string16& display_name) { |
335 g_browser_process->local_state()-> | 335 g_browser_process->local_state()-> |
336 SetString(kLocallyManagedUserCreationTransactionDisplayName, | 336 SetString(kLocallyManagedUserCreationTransactionDisplayName, |
337 UTF16ToASCII(display_name)); | 337 base::UTF16ToASCII(display_name)); |
338 g_browser_process->local_state()->CommitPendingWrite(); | 338 g_browser_process->local_state()->CommitPendingWrite(); |
339 } | 339 } |
340 | 340 |
341 void SupervisedUserManagerImpl::SetCreationTransactionUserId( | 341 void SupervisedUserManagerImpl::SetCreationTransactionUserId( |
342 const std::string& email) { | 342 const std::string& email) { |
343 g_browser_process->local_state()-> | 343 g_browser_process->local_state()-> |
344 SetString(kLocallyManagedUserCreationTransactionUserId, | 344 SetString(kLocallyManagedUserCreationTransactionUserId, |
345 email); | 345 email); |
346 g_browser_process->local_state()->CommitPendingWrite(); | 346 g_browser_process->local_state()->CommitPendingWrite(); |
347 } | 347 } |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 } | 462 } |
463 | 463 |
464 void SupervisedUserManagerImpl::ConfigureSyncWithToken( | 464 void SupervisedUserManagerImpl::ConfigureSyncWithToken( |
465 Profile* profile, | 465 Profile* profile, |
466 const std::string& token) { | 466 const std::string& token) { |
467 if (!token.empty()) | 467 if (!token.empty()) |
468 ManagedUserServiceFactory::GetForProfile(profile)->InitSync(token); | 468 ManagedUserServiceFactory::GetForProfile(profile)->InitSync(token); |
469 } | 469 } |
470 | 470 |
471 } // namespace chromeos | 471 } // namespace chromeos |
OLD | NEW |