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

Side by Side Diff: chrome/browser/sync_file_system/drive_file_sync_service.cc

Issue 11665029: Sync FileSystem: Mark empty batch sync origin as incremental sync origin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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 | Annotate | Revision Log
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_file_system/drive_file_sync_service.h" 5 #include "chrome/browser/sync_file_system/drive_file_sync_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 GURL next_feed_url; 880 GURL next_feed_url;
881 if (feed->GetNextFeedURL(&next_feed_url)) { 881 if (feed->GetNextFeedURL(&next_feed_url)) {
882 sync_client_->ContinueListing( 882 sync_client_->ContinueListing(
883 next_feed_url, 883 next_feed_url,
884 base::Bind( 884 base::Bind(
885 &DriveFileSyncService::DidGetDirectoryContentForBatchSync, 885 &DriveFileSyncService::DidGetDirectoryContentForBatchSync,
886 AsWeakPtr(), base::Passed(&token), origin, largest_changestamp)); 886 AsWeakPtr(), base::Passed(&token), origin, largest_changestamp));
887 return; 887 return;
888 } 888 }
889 889
890 if (metadata_store_->IsBatchSyncOrigin(origin) &&
891 !ContainsKey(url_to_change_, origin)) {
kinuko 2013/01/04 10:38:54 This is not directly related to this change, but c
tzik 2013/01/07 08:37:55 Let me rename to 'origin_to_changes_map_'. Its typ
892 metadata_store_->MoveBatchSyncOriginToIncremental(origin);
893 }
894
890 NotifyTaskDone(fileapi::SYNC_STATUS_OK, token.Pass()); 895 NotifyTaskDone(fileapi::SYNC_STATUS_OK, token.Pass());
891 } 896 }
892 897
893 void DriveFileSyncService::DidRemoveOriginOnMetadataStore( 898 void DriveFileSyncService::DidRemoveOriginOnMetadataStore(
894 scoped_ptr<TaskToken> token, 899 scoped_ptr<TaskToken> token,
895 const fileapi::SyncStatusCallback& callback, 900 const fileapi::SyncStatusCallback& callback,
896 fileapi::SyncStatusCode status) { 901 fileapi::SyncStatusCode status) {
897 NotifyTaskDone(status, token.Pass()); 902 NotifyTaskDone(status, token.Pass());
898 callback.Run(status); 903 callback.Run(status);
899 } 904 }
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
1692 fileapi::SyncStatusCode 1697 fileapi::SyncStatusCode
1693 DriveFileSyncService::GDataErrorCodeToSyncStatusCodeWrapper( 1698 DriveFileSyncService::GDataErrorCodeToSyncStatusCodeWrapper(
1694 google_apis::GDataErrorCode error) const { 1699 google_apis::GDataErrorCode error) const {
1695 fileapi::SyncStatusCode status = GDataErrorCodeToSyncStatusCode(error); 1700 fileapi::SyncStatusCode status = GDataErrorCodeToSyncStatusCode(error);
1696 if (status != fileapi::SYNC_STATUS_OK && !sync_client_->IsAuthenticated()) 1701 if (status != fileapi::SYNC_STATUS_OK && !sync_client_->IsAuthenticated())
1697 return fileapi::SYNC_STATUS_AUTHENTICATION_FAILED; 1702 return fileapi::SYNC_STATUS_AUTHENTICATION_FAILED;
1698 return status; 1703 return status;
1699 } 1704 }
1700 1705
1701 } // namespace sync_file_system 1706 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698