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

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

Issue 12223088: Sync FileSystem: Update metadata database even when the file is not modified. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 base::Bind(&DriveFileSyncService::DidDownloadFileForRemoteSync, 1538 base::Bind(&DriveFileSyncService::DidDownloadFileForRemoteSync,
1539 AsWeakPtr(), base::Passed(&param))); 1539 AsWeakPtr(), base::Passed(&param)));
1540 } 1540 }
1541 1541
1542 void DriveFileSyncService::DidDownloadFileForRemoteSync( 1542 void DriveFileSyncService::DidDownloadFileForRemoteSync(
1543 scoped_ptr<ProcessRemoteChangeParam> param, 1543 scoped_ptr<ProcessRemoteChangeParam> param,
1544 google_apis::GDataErrorCode error, 1544 google_apis::GDataErrorCode error,
1545 const std::string& md5_checksum) { 1545 const std::string& md5_checksum) {
1546 if (error == google_apis::HTTP_NOT_MODIFIED) { 1546 if (error == google_apis::HTTP_NOT_MODIFIED) {
1547 param->sync_action = fileapi::SYNC_ACTION_NONE; 1547 param->sync_action = fileapi::SYNC_ACTION_NONE;
1548 CompleteRemoteSync(param.Pass(), fileapi::SYNC_STATUS_OK); 1548 DidApplyRemoteChange(param.Pass(), fileapi::SYNC_STATUS_OK);
1549 return; 1549 return;
1550 } 1550 }
1551 1551
1552 fileapi::SyncStatusCode status = GDataErrorCodeToSyncStatusCodeWrapper(error); 1552 fileapi::SyncStatusCode status = GDataErrorCodeToSyncStatusCodeWrapper(error);
1553 if (status != fileapi::SYNC_STATUS_OK) { 1553 if (status != fileapi::SYNC_STATUS_OK) {
1554 AbortRemoteSync(param.Pass(), status); 1554 AbortRemoteSync(param.Pass(), status);
1555 return; 1555 return;
1556 } 1556 }
1557 1557
1558 param->drive_metadata.set_md5_checksum(md5_checksum); 1558 param->drive_metadata.set_md5_checksum(md5_checksum);
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 fileapi::SyncStatusCode 2022 fileapi::SyncStatusCode
2023 DriveFileSyncService::GDataErrorCodeToSyncStatusCodeWrapper( 2023 DriveFileSyncService::GDataErrorCodeToSyncStatusCodeWrapper(
2024 google_apis::GDataErrorCode error) const { 2024 google_apis::GDataErrorCode error) const {
2025 fileapi::SyncStatusCode status = GDataErrorCodeToSyncStatusCode(error); 2025 fileapi::SyncStatusCode status = GDataErrorCodeToSyncStatusCode(error);
2026 if (status != fileapi::SYNC_STATUS_OK && !sync_client_->IsAuthenticated()) 2026 if (status != fileapi::SYNC_STATUS_OK && !sync_client_->IsAuthenticated())
2027 return fileapi::SYNC_STATUS_AUTHENTICATION_FAILED; 2027 return fileapi::SYNC_STATUS_AUTHENTICATION_FAILED;
2028 return status; 2028 return status;
2029 } 2029 }
2030 2030
2031 } // namespace sync_file_system 2031 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698