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

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

Issue 305913002: drive: Replace GetResourceListCallback in DriveServiceInterface with FileListCallback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 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 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_INITIALIZER_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_INITIALIZER_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_INITIALIZER_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_INITIALIZER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "chrome/browser/sync_file_system/drive_backend/sync_task.h" 14 #include "chrome/browser/sync_file_system/drive_backend/sync_task.h"
15 #include "chrome/browser/sync_file_system/sync_callbacks.h" 15 #include "chrome/browser/sync_file_system/sync_callbacks.h"
16 #include "google_apis/drive/drive_common_callbacks.h" 16 #include "google_apis/drive/drive_common_callbacks.h"
17 #include "google_apis/drive/gdata_errorcode.h" 17 #include "google_apis/drive/gdata_errorcode.h"
18 18
19 namespace drive { 19 namespace drive {
20 class DriveServiceInterface; 20 class DriveServiceInterface;
21 } 21 }
22 22
23 namespace google_apis { 23 namespace google_apis {
24 class AboutResource; 24 class AboutResource;
25 class FileList;
26 class FileResource;
25 class ResourceEntry; 27 class ResourceEntry;
26 class ResourceList;
27 } 28 }
28 29
29 namespace leveldb { 30 namespace leveldb {
30 class Env; 31 class Env;
31 } 32 }
32 33
33 namespace sync_file_system { 34 namespace sync_file_system {
34 namespace drive_backend { 35 namespace drive_backend {
35 36
36 class MetadataDatabase; 37 class MetadataDatabase;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 scoped_ptr<MetadataDatabase> instance); 82 scoped_ptr<MetadataDatabase> instance);
82 83
83 void GetAboutResource(scoped_ptr<SyncTaskToken> token); 84 void GetAboutResource(scoped_ptr<SyncTaskToken> token);
84 void DidGetAboutResource( 85 void DidGetAboutResource(
85 scoped_ptr<SyncTaskToken> token, 86 scoped_ptr<SyncTaskToken> token,
86 google_apis::GDataErrorCode error, 87 google_apis::GDataErrorCode error,
87 scoped_ptr<google_apis::AboutResource> about_resource); 88 scoped_ptr<google_apis::AboutResource> about_resource);
88 void FindSyncRoot(scoped_ptr<SyncTaskToken> token); 89 void FindSyncRoot(scoped_ptr<SyncTaskToken> token);
89 void DidFindSyncRoot(scoped_ptr<SyncTaskToken> token, 90 void DidFindSyncRoot(scoped_ptr<SyncTaskToken> token,
90 google_apis::GDataErrorCode error, 91 google_apis::GDataErrorCode error,
91 scoped_ptr<google_apis::ResourceList> resource_list); 92 scoped_ptr<google_apis::FileList> file_list);
92 void CreateSyncRoot(scoped_ptr<SyncTaskToken> token); 93 void CreateSyncRoot(scoped_ptr<SyncTaskToken> token);
93 void DidCreateSyncRoot(scoped_ptr<SyncTaskToken> token, 94 void DidCreateSyncRoot(scoped_ptr<SyncTaskToken> token,
94 google_apis::GDataErrorCode error, 95 google_apis::GDataErrorCode error,
95 scoped_ptr<google_apis::ResourceEntry> entry); 96 scoped_ptr<google_apis::ResourceEntry> entry);
96 void DetachSyncRoot(scoped_ptr<SyncTaskToken> token); 97 void DetachSyncRoot(scoped_ptr<SyncTaskToken> token);
97 void DidDetachSyncRoot(scoped_ptr<SyncTaskToken> token, 98 void DidDetachSyncRoot(scoped_ptr<SyncTaskToken> token,
98 google_apis::GDataErrorCode error); 99 google_apis::GDataErrorCode error);
99 void ListAppRootFolders(scoped_ptr<SyncTaskToken> token); 100 void ListAppRootFolders(scoped_ptr<SyncTaskToken> token);
100 void DidListAppRootFolders( 101 void DidListAppRootFolders(
101 scoped_ptr<SyncTaskToken> token, 102 scoped_ptr<SyncTaskToken> token,
102 google_apis::GDataErrorCode error, 103 google_apis::GDataErrorCode error,
103 scoped_ptr<google_apis::ResourceList> resource_list); 104 scoped_ptr<google_apis::FileList> file_list);
104 void PopulateDatabase(scoped_ptr<SyncTaskToken> token); 105 void PopulateDatabase(scoped_ptr<SyncTaskToken> token);
105 void DidPopulateDatabase(scoped_ptr<SyncTaskToken> token, 106 void DidPopulateDatabase(scoped_ptr<SyncTaskToken> token,
106 SyncStatusCode status); 107 SyncStatusCode status);
107 108
108 SyncEngineContext* sync_context_; // Not owned. 109 SyncEngineContext* sync_context_; // Not owned.
109 leveldb::Env* env_override_; 110 leveldb::Env* env_override_;
110 111
111 google_apis::CancelCallback cancel_callback_; 112 google_apis::CancelCallback cancel_callback_;
112 base::FilePath database_path_; 113 base::FilePath database_path_;
113 114
114 int find_sync_root_retry_count_; 115 int find_sync_root_retry_count_;
115 116
116 scoped_ptr<MetadataDatabase> metadata_database_; 117 scoped_ptr<MetadataDatabase> metadata_database_;
117 ScopedVector<google_apis::ResourceEntry> app_root_folders_; 118 ScopedVector<google_apis::FileResource> app_root_folders_;
118 119
119 int64 largest_change_id_; 120 int64 largest_change_id_;
120 std::string root_folder_id_; 121 std::string root_folder_id_;
121 122
122 scoped_ptr<google_apis::ResourceEntry> sync_root_folder_; 123 scoped_ptr<google_apis::FileResource> sync_root_folder_;
123 124
124 base::WeakPtrFactory<SyncEngineInitializer> weak_ptr_factory_; 125 base::WeakPtrFactory<SyncEngineInitializer> weak_ptr_factory_;
125 126
126 DISALLOW_COPY_AND_ASSIGN(SyncEngineInitializer); 127 DISALLOW_COPY_AND_ASSIGN(SyncEngineInitializer);
127 }; 128 };
128 129
129 } // namespace drive_backend 130 } // namespace drive_backend
130 } // namespace sync_file_system 131 } // namespace sync_file_system
131 132
132 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_INITIALIZER _H_ 133 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_INITIALIZER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698