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

Side by Side Diff: components/user_manager/user_manager_base.cc

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/user_manager/user_manager_base.h" 5 #include "components/user_manager/user_manager_base.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 // Do not update local state if data stored or cached outside the user's 353 // Do not update local state if data stored or cached outside the user's
354 // cryptohome is to be treated as ephemeral. 354 // cryptohome is to be treated as ephemeral.
355 if (IsUserNonCryptohomeDataEphemeral(account_id)) 355 if (IsUserNonCryptohomeDataEphemeral(account_id))
356 return; 356 return;
357 357
358 { 358 {
359 DictionaryPrefUpdate oauth_status_update(GetLocalState(), 359 DictionaryPrefUpdate oauth_status_update(GetLocalState(),
360 kUserOAuthTokenStatus); 360 kUserOAuthTokenStatus);
361 oauth_status_update->SetWithoutPathExpansion( 361 oauth_status_update->SetWithoutPathExpansion(
362 account_id.GetUserEmail(), 362 account_id.GetUserEmail(),
363 new base::FundamentalValue(static_cast<int>(oauth_token_status))); 363 new base::Value(static_cast<int>(oauth_token_status)));
364 } 364 }
365 GetLocalState()->CommitPendingWrite(); 365 GetLocalState()->CommitPendingWrite();
366 } 366 }
367 367
368 void UserManagerBase::SaveForceOnlineSignin(const AccountId& account_id, 368 void UserManagerBase::SaveForceOnlineSignin(const AccountId& account_id,
369 bool force_online_signin) { 369 bool force_online_signin) {
370 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 370 DCHECK(task_runner_->RunsTasksOnCurrentThread());
371 371
372 // Do not update local state if data stored or cached outside the user's 372 // Do not update local state if data stored or cached outside the user's
373 // cryptohome is to be treated as ephemeral. 373 // cryptohome is to be treated as ephemeral.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 } 446 }
447 447
448 // Do not update local state if data stored or cached outside the user's 448 // Do not update local state if data stored or cached outside the user's
449 // cryptohome is to be treated as ephemeral. 449 // cryptohome is to be treated as ephemeral.
450 if (IsUserNonCryptohomeDataEphemeral(account_id)) 450 if (IsUserNonCryptohomeDataEphemeral(account_id))
451 return; 451 return;
452 452
453 DictionaryPrefUpdate user_type_update(GetLocalState(), kUserType); 453 DictionaryPrefUpdate user_type_update(GetLocalState(), kUserType);
454 user_type_update->SetWithoutPathExpansion( 454 user_type_update->SetWithoutPathExpansion(
455 account_id.GetUserEmail(), 455 account_id.GetUserEmail(),
456 new base::FundamentalValue(static_cast<int>(user_type))); 456 new base::Value(static_cast<int>(user_type)));
457 GetLocalState()->CommitPendingWrite(); 457 GetLocalState()->CommitPendingWrite();
458 } 458 }
459 459
460 void UserManagerBase::UpdateUserAccountData( 460 void UserManagerBase::UpdateUserAccountData(
461 const AccountId& account_id, 461 const AccountId& account_id,
462 const UserAccountData& account_data) { 462 const UserAccountData& account_data) {
463 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 463 DCHECK(task_runner_->RunsTasksOnCurrentThread());
464 464
465 SaveUserDisplayName(account_id, account_data.display_name()); 465 SaveUserDisplayName(account_id, account_data.display_name());
466 466
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 } 1061 }
1062 1062
1063 void UserManagerBase::DeleteUser(User* user) { 1063 void UserManagerBase::DeleteUser(User* user) {
1064 const bool is_active_user = (user == active_user_); 1064 const bool is_active_user = (user == active_user_);
1065 delete user; 1065 delete user;
1066 if (is_active_user) 1066 if (is_active_user)
1067 active_user_ = nullptr; 1067 active_user_ = nullptr;
1068 } 1068 }
1069 1069
1070 } // namespace user_manager 1070 } // namespace user_manager
OLDNEW
« no previous file with comments | « components/test_runner/tracked_dictionary.cc ('k') | components/user_prefs/tracked/pref_hash_calculator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698