OLD | NEW |
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/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 base::Time start, | 175 base::Time start, |
176 base::Time end) { | 176 base::Time end) { |
177 // BrowsingDataRemover deletes itself when it's done. | 177 // BrowsingDataRemover deletes itself when it's done. |
178 BrowsingDataRemover* remover = BrowsingDataRemover::CreateForRange( | 178 BrowsingDataRemover* remover = BrowsingDataRemover::CreateForRange( |
179 profile, start, end); | 179 profile, start, end); |
180 if (observer) | 180 if (observer) |
181 remover->AddObserver(observer); | 181 remover->AddObserver(observer); |
182 remover->Remove(BrowsingDataRemover::REMOVE_ALL, | 182 remover->Remove(BrowsingDataRemover::REMOVE_ALL, |
183 BrowsingDataHelper::ALL); | 183 BrowsingDataHelper::ALL); |
184 | 184 |
185 password_manager::PasswordStore* password = | 185 scoped_refptr<password_manager::PasswordStore> password = |
186 PasswordStoreFactory::GetForProfile(profile, Profile::EXPLICIT_ACCESS); | 186 PasswordStoreFactory::GetForProfile(profile, Profile::EXPLICIT_ACCESS); |
187 password->RemoveLoginsSyncedBetween(start, end); | 187 password->RemoveLoginsSyncedBetween(start, end); |
188 } | 188 } |
189 | 189 |
190 } // anonymous namespace | 190 } // anonymous namespace |
191 | 191 |
192 bool ShouldShowActionOnUI( | 192 bool ShouldShowActionOnUI( |
193 const syncer::SyncProtocolError& error) { | 193 const syncer::SyncProtocolError& error) { |
194 return (error.action != syncer::UNKNOWN_ACTION && | 194 return (error.action != syncer::UNKNOWN_ACTION && |
195 error.action != syncer::DISABLE_SYNC_ON_CLIENT && | 195 error.action != syncer::DISABLE_SYNC_ON_CLIENT && |
(...skipping 2587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2783 true)); | 2783 true)); |
2784 } | 2784 } |
2785 | 2785 |
2786 bool ProfileSyncService::NeedBackup() const { | 2786 bool ProfileSyncService::NeedBackup() const { |
2787 return need_backup_; | 2787 return need_backup_; |
2788 } | 2788 } |
2789 | 2789 |
2790 base::Time ProfileSyncService::GetDeviceBackupTimeForTesting() const { | 2790 base::Time ProfileSyncService::GetDeviceBackupTimeForTesting() const { |
2791 return backend_->GetSyncedDeviceTracker()->GetLocalDeviceBackupTime(); | 2791 return backend_->GetSyncedDeviceTracker()->GetLocalDeviceBackupTime(); |
2792 } | 2792 } |
OLD | NEW |