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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/metadata_database.cc

Issue 449383002: [SyncFS] Handle trashed flag in change list as missing file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_backend/metadata_database.h" 5 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 else if (file_resource.IsHostedDocument()) 98 else if (file_resource.IsHostedDocument())
99 details->set_file_kind(FILE_KIND_UNSUPPORTED); 99 details->set_file_kind(FILE_KIND_UNSUPPORTED);
100 else 100 else
101 details->set_file_kind(FILE_KIND_FILE); 101 details->set_file_kind(FILE_KIND_FILE);
102 102
103 details->set_md5(file_resource.md5_checksum()); 103 details->set_md5(file_resource.md5_checksum());
104 details->set_etag(file_resource.etag()); 104 details->set_etag(file_resource.etag());
105 details->set_creation_time(file_resource.created_date().ToInternalValue()); 105 details->set_creation_time(file_resource.created_date().ToInternalValue());
106 details->set_modification_time( 106 details->set_modification_time(
107 file_resource.modified_date().ToInternalValue()); 107 file_resource.modified_date().ToInternalValue());
108 details->set_missing(false); 108 details->set_missing(file_resource.labels().is_trashed());
109 } 109 }
110 110
111 scoped_ptr<FileMetadata> CreateFileMetadataFromFileResource( 111 scoped_ptr<FileMetadata> CreateFileMetadataFromFileResource(
112 int64 change_id, 112 int64 change_id,
113 const google_apis::FileResource& resource) { 113 const google_apis::FileResource& resource) {
114 scoped_ptr<FileMetadata> file(new FileMetadata); 114 scoped_ptr<FileMetadata> file(new FileMetadata);
115 file->set_file_id(resource.file_id()); 115 file->set_file_id(resource.file_id());
116 116
117 FileDetails* details = file->mutable_details(); 117 FileDetails* details = file->mutable_details();
118 details->set_change_id(change_id); 118 details->set_change_id(change_id);
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1877 index_->StoreFileMetadata(app_root_metadata.Pass()); 1877 index_->StoreFileMetadata(app_root_metadata.Pass());
1878 index_->StoreFileTracker(app_root_tracker.Pass()); 1878 index_->StoreFileTracker(app_root_tracker.Pass());
1879 } 1879 }
1880 1880
1881 void MetadataDatabase::DetachFromSequence() { 1881 void MetadataDatabase::DetachFromSequence() {
1882 worker_sequence_checker_.DetachFromSequence(); 1882 worker_sequence_checker_.DetachFromSequence();
1883 } 1883 }
1884 1884
1885 } // namespace drive_backend 1885 } // namespace drive_backend
1886 } // namespace sync_file_system 1886 } // 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