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

Side by Side Diff: chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 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
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 "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h" 5 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 538
539 void UserImageManagerImpl::Job::UpdateLocalState() { 539 void UserImageManagerImpl::Job::UpdateLocalState() {
540 // Ignore if data stored or cached outside the user's cryptohome is to be 540 // Ignore if data stored or cached outside the user's cryptohome is to be
541 // treated as ephemeral. 541 // treated as ephemeral.
542 if (parent_->user_manager_->IsUserNonCryptohomeDataEphemeral( 542 if (parent_->user_manager_->IsUserNonCryptohomeDataEphemeral(
543 AccountId::FromUserEmail(user_id()))) 543 AccountId::FromUserEmail(user_id())))
544 return; 544 return;
545 545
546 std::unique_ptr<base::DictionaryValue> entry(new base::DictionaryValue); 546 std::unique_ptr<base::DictionaryValue> entry(new base::DictionaryValue);
547 entry->Set(kImagePathNodeName, new base::StringValue(image_path_.value())); 547 entry->Set(kImagePathNodeName, new base::StringValue(image_path_.value()));
548 entry->Set(kImageIndexNodeName, new base::FundamentalValue(image_index_)); 548 entry->Set(kImageIndexNodeName, new base::Value(image_index_));
549 if (!image_url_.is_empty()) 549 if (!image_url_.is_empty())
550 entry->Set(kImageURLNodeName, new base::StringValue(image_url_.spec())); 550 entry->Set(kImageURLNodeName, new base::StringValue(image_url_.spec()));
551 DictionaryPrefUpdate update(g_browser_process->local_state(), 551 DictionaryPrefUpdate update(g_browser_process->local_state(),
552 kUserImageProperties); 552 kUserImageProperties);
553 update->SetWithoutPathExpansion(user_id(), entry.release()); 553 update->SetWithoutPathExpansion(user_id(), entry.release());
554 554
555 parent_->user_manager_->NotifyLocalStateChanged(); 555 parent_->user_manager_->NotifyLocalStateChanged();
556 } 556 }
557 557
558 void UserImageManagerImpl::Job::NotifyJobDone() { 558 void UserImageManagerImpl::Job::NotifyJobDone() {
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 } 1020 }
1021 1021
1022 bool UserImageManagerImpl::IsUserLoggedInAndHasGaiaAccount() const { 1022 bool UserImageManagerImpl::IsUserLoggedInAndHasGaiaAccount() const {
1023 const user_manager::User* user = GetUser(); 1023 const user_manager::User* user = GetUser();
1024 if (!user) 1024 if (!user)
1025 return false; 1025 return false;
1026 return user->is_logged_in() && user->HasGaiaAccount(); 1026 return user->is_logged_in() && user->HasGaiaAccount();
1027 } 1027 }
1028 1028
1029 } // namespace chromeos 1029 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/saml/saml_browsertest.cc ('k') | chrome/browser/chromeos/net/network_state_notifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698