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

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 551843003: Persist Directory to disk when the app is backgrounded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a thread check and fix a comment. Created 6 years, 3 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 (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 2749 matching lines...) Expand 10 before | Expand all | Expand 10 after
2760 true)); 2760 true));
2761 } 2761 }
2762 2762
2763 bool ProfileSyncService::NeedBackup() const { 2763 bool ProfileSyncService::NeedBackup() const {
2764 return need_backup_; 2764 return need_backup_;
2765 } 2765 }
2766 2766
2767 base::Time ProfileSyncService::GetDeviceBackupTimeForTesting() const { 2767 base::Time ProfileSyncService::GetDeviceBackupTimeForTesting() const {
2768 return backend_->GetSyncedDeviceTracker()->GetLocalDeviceBackupTime(); 2768 return backend_->GetSyncedDeviceTracker()->GetLocalDeviceBackupTime();
2769 } 2769 }
2770
2771 void ProfileSyncService::FlushDirectory() const {
2772 // If the user is signed out of sync, backend can be NULL.
2773 if (backend_ != NULL) {
Nicolas Zea 2014/09/15 22:38:59 nit: no curly braces for single line conditional (
maxbogue 2014/09/16 15:34:31 Done. This should be against the Chrome style guid
2774 backend_->FlushDirectory();
2775 }
2776 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698