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

Side by Side Diff: chrome/browser/sync_file_system/drive_metadata_store.h

Issue 12389017: Added function DeleteOriginDirectory to RemoteFileSyncService interface that removes the remote cop… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for commit Created 7 years, 9 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 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_METADATA_STORE_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_METADATA_STORE_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_METADATA_STORE_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_METADATA_STORE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void UpdateEntry(const fileapi::FileSystemURL& url, 60 void UpdateEntry(const fileapi::FileSystemURL& url,
61 const DriveMetadata& metadata, 61 const DriveMetadata& metadata,
62 const SyncStatusCallback& callback); 62 const SyncStatusCallback& callback);
63 63
64 // Deletes database entry for |url|. Invokes |callback|, upon completion. 64 // Deletes database entry for |url|. Invokes |callback|, upon completion.
65 void DeleteEntry(const fileapi::FileSystemURL& url, 65 void DeleteEntry(const fileapi::FileSystemURL& url,
66 const SyncStatusCallback& callback); 66 const SyncStatusCallback& callback);
67 67
68 // Lookups and reads the database entry for |url|. 68 // Lookups and reads the database entry for |url|.
69 SyncStatusCode ReadEntry(const fileapi::FileSystemURL& url, 69 SyncStatusCode ReadEntry(const fileapi::FileSystemURL& url,
70 DriveMetadata* metadata) const; 70 DriveMetadata* metadata) const;
71 71
72 // Returns true if |origin| is a batch sync origin, i.e. the origin's entire 72 // Returns true if |origin| is a batch sync origin, i.e. the origin's entire
73 // file list hasn't been fully fetched and processed yet. 73 // file list hasn't been fully fetched and processed yet.
74 bool IsBatchSyncOrigin(const GURL& origin) const; 74 bool IsBatchSyncOrigin(const GURL& origin) const;
75 75
76 // Returns true if |origin| is an incremental sync origin, i.e. the origin's 76 // Returns true if |origin| is an incremental sync origin, i.e. the origin's
77 // entire file list has been cached and is ready to apply changes 77 // entire file list has been cached and is ready to apply changes
78 // incrementally. 78 // incrementally.
79 bool IsIncrementalSyncOrigin(const GURL& origin) const; 79 bool IsIncrementalSyncOrigin(const GURL& origin) const;
80 80
(...skipping 11 matching lines...) Expand all
92 92
93 // Sets the directory identified by |resource_id| as the sync data directory. 93 // Sets the directory identified by |resource_id| as the sync data directory.
94 // All data for the Sync FileSystem should be store into the directory. 94 // All data for the Sync FileSystem should be store into the directory.
95 // It is invalid to overwrite the directory. 95 // It is invalid to overwrite the directory.
96 void SetSyncRootDirectory(const std::string& resource_id); 96 void SetSyncRootDirectory(const std::string& resource_id);
97 97
98 // Returns a set of URLs for files in conflict. 98 // Returns a set of URLs for files in conflict.
99 SyncStatusCode GetConflictURLs( 99 SyncStatusCode GetConflictURLs(
100 fileapi::FileSystemURLSet* urls) const; 100 fileapi::FileSystemURLSet* urls) const;
101 101
102 // Returns a set of URLs and Resource IDs for files te be fetched. 102 // Returns a set of URLs and Resource IDs for files to be fetched.
103 SyncStatusCode GetToBeFetchedFiles(URLAndResourceIdList* list) const; 103 SyncStatusCode GetToBeFetchedFiles(URLAndResourceIdList* list) const;
104 104
105 // Returns resource id for |origin|. |origin| must be a batch sync origin or 105 // Returns resource id for |origin|. |origin| must be a batch sync origin or
106 // an incremental sync origin. 106 // an incremental sync origin.
107 std::string GetResourceIdForOrigin(const GURL& origin) const; 107 std::string GetResourceIdForOrigin(const GURL& origin) const;
108 108
109 const std::string& sync_root_directory() const { 109 const std::string& sync_root_directory() const {
110 DCHECK(CalledOnValidThread()); 110 DCHECK(CalledOnValidThread());
111 return sync_root_directory_resource_id_; 111 return sync_root_directory_resource_id_;
112 } 112 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 std::string sync_root_directory_resource_id_; 158 std::string sync_root_directory_resource_id_;
159 ResourceIDMap batch_sync_origins_; 159 ResourceIDMap batch_sync_origins_;
160 ResourceIDMap incremental_sync_origins_; 160 ResourceIDMap incremental_sync_origins_;
161 161
162 DISALLOW_COPY_AND_ASSIGN(DriveMetadataStore); 162 DISALLOW_COPY_AND_ASSIGN(DriveMetadataStore);
163 }; 163 };
164 164
165 } // namespace sync_file_system 165 } // namespace sync_file_system
166 166
167 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_METADATA_STORE_H_ 167 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_METADATA_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698