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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/metadata_database_index_interface.h

Issue 1873683002: Convert //chrome/browser/sync_file_system from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BACKEND_METADATA_DATABASE_INDEX_IN TERFACE_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_INDEX_IN TERFACE_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_INDEX_IN TERFACE_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_INDEX_IN TERFACE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory>
11 #include <string> 12 #include <string>
12 #include <vector> 13 #include <vector>
13 14
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/scoped_ptr.h"
16 16
17 namespace sync_file_system { 17 namespace sync_file_system {
18 namespace drive_backend { 18 namespace drive_backend {
19 19
20 class FileMetadata; 20 class FileMetadata;
21 class FileTracker; 21 class FileTracker;
22 class TrackerIDSet; 22 class TrackerIDSet;
23 23
24 struct ParentIDAndTitle { 24 struct ParentIDAndTitle {
25 int64_t parent_id; 25 int64_t parent_id;
(...skipping 20 matching lines...) Expand all
46 virtual bool GetFileMetadata( 46 virtual bool GetFileMetadata(
47 const std::string& file_id, FileMetadata* metadata) const = 0; 47 const std::string& file_id, FileMetadata* metadata) const = 0;
48 48
49 // Returns true if FileTracker identified by |tracker_id| exists. 49 // Returns true if FileTracker identified by |tracker_id| exists.
50 // If |tracker| is not NULL, the FileTracker is copied to it. 50 // If |tracker| is not NULL, the FileTracker is copied to it.
51 virtual bool GetFileTracker(int64_t tracker_id, 51 virtual bool GetFileTracker(int64_t tracker_id,
52 FileTracker* tracker) const = 0; 52 FileTracker* tracker) const = 0;
53 53
54 // Stores |metadata| and updates indexes. 54 // Stores |metadata| and updates indexes.
55 // This overwrites existing FileMetadata for the same |file_id|. 55 // This overwrites existing FileMetadata for the same |file_id|.
56 virtual void StoreFileMetadata(scoped_ptr<FileMetadata> metadata) = 0; 56 virtual void StoreFileMetadata(std::unique_ptr<FileMetadata> metadata) = 0;
57 57
58 // Stores |tracker| and updates indexes. 58 // Stores |tracker| and updates indexes.
59 // This overwrites existing FileTracker for the same |tracker_id|. 59 // This overwrites existing FileTracker for the same |tracker_id|.
60 virtual void StoreFileTracker(scoped_ptr<FileTracker> tracker) = 0; 60 virtual void StoreFileTracker(std::unique_ptr<FileTracker> tracker) = 0;
61 61
62 // Removes FileMetadata identified by |file_id| from indexes. 62 // Removes FileMetadata identified by |file_id| from indexes.
63 virtual void RemoveFileMetadata(const std::string& file_id) = 0; 63 virtual void RemoveFileMetadata(const std::string& file_id) = 0;
64 64
65 // Removes FileTracker identified by |tracker_id| from indexes. 65 // Removes FileTracker identified by |tracker_id| from indexes.
66 virtual void RemoveFileTracker(int64_t tracker_id) = 0; 66 virtual void RemoveFileTracker(int64_t tracker_id) = 0;
67 67
68 // Returns a set of FileTracker that have |file_id| as its own. 68 // Returns a set of FileTracker that have |file_id| as its own.
69 virtual TrackerIDSet GetFileTrackerIDsByFileID( 69 virtual TrackerIDSet GetFileTrackerIDsByFileID(
70 const std::string& file_id) const = 0; 70 const std::string& file_id) const = 0;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 virtual std::vector<std::string> GetAllMetadataIDs() const = 0; 122 virtual std::vector<std::string> GetAllMetadataIDs() const = 0;
123 123
124 private: 124 private:
125 DISALLOW_COPY_AND_ASSIGN(MetadataDatabaseIndexInterface); 125 DISALLOW_COPY_AND_ASSIGN(MetadataDatabaseIndexInterface);
126 }; 126 };
127 127
128 } // namespace drive_backend 128 } // namespace drive_backend
129 } // namespace sync_file_system 129 } // namespace sync_file_system
130 130
131 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_INDEX _INTERFACE_H_ 131 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_INDEX _INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698