OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/ui/webui/settings/people_handler.h" | 5 #include "chrome/browser/ui/webui/settings/people_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 const std::string& /* username */, | 684 const std::string& /* username */, |
685 const std::string& /* password */) { | 685 const std::string& /* password */) { |
686 UpdateSyncStatus(); | 686 UpdateSyncStatus(); |
687 } | 687 } |
688 | 688 |
689 void PeopleHandler::GoogleSignedOut(const std::string& /* account_id */, | 689 void PeopleHandler::GoogleSignedOut(const std::string& /* account_id */, |
690 const std::string& /* username */) { | 690 const std::string& /* username */) { |
691 UpdateSyncStatus(); | 691 UpdateSyncStatus(); |
692 } | 692 } |
693 | 693 |
694 void PeopleHandler::OnStateChanged() { | 694 void PeopleHandler::OnStateChanged(syncer::SyncService* sync) { |
695 UpdateSyncStatus(); | 695 UpdateSyncStatus(); |
696 | 696 |
697 // When the SyncService changes its state, we should also push the updated | 697 // When the SyncService changes its state, we should also push the updated |
698 // sync preferences. | 698 // sync preferences. |
699 PushSyncPrefs(); | 699 PushSyncPrefs(); |
700 } | 700 } |
701 | 701 |
702 std::unique_ptr<base::DictionaryValue> | 702 std::unique_ptr<base::DictionaryValue> |
703 PeopleHandler::GetSyncStatusDictionary() { | 703 PeopleHandler::GetSyncStatusDictionary() { |
704 // The items which are to be written into |sync_status| are also described in | 704 // The items which are to be written into |sync_status| are also described in |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 base::FilePath profile_file_path = profile_->GetPath(); | 914 base::FilePath profile_file_path = profile_->GetPath(); |
915 ProfileMetrics::LogProfileSyncSignIn(profile_file_path); | 915 ProfileMetrics::LogProfileSyncSignIn(profile_file_path); |
916 | 916 |
917 // We're done configuring, so notify ProfileSyncService that it is OK to | 917 // We're done configuring, so notify ProfileSyncService that it is OK to |
918 // start syncing. | 918 // start syncing. |
919 sync_blocker_.reset(); | 919 sync_blocker_.reset(); |
920 service->SetFirstSetupComplete(); | 920 service->SetFirstSetupComplete(); |
921 } | 921 } |
922 | 922 |
923 } // namespace settings | 923 } // namespace settings |
OLD | NEW |