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

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

Issue 560703002: [SyncFS] Expand simple functions to their caller in drive_backend/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@03_context_rename
Patch Set: rebase Created 6 years, 3 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 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"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 const base::FilePath& database_path, 70 const base::FilePath& database_path,
71 leveldb::Env* env_override); 71 leveldb::Env* env_override);
72 virtual ~SyncEngineInitializer(); 72 virtual ~SyncEngineInitializer();
73 virtual void RunPreflight(scoped_ptr<SyncTaskToken> token) OVERRIDE; 73 virtual void RunPreflight(scoped_ptr<SyncTaskToken> token) OVERRIDE;
74 74
75 scoped_ptr<MetadataDatabase> PassMetadataDatabase(); 75 scoped_ptr<MetadataDatabase> PassMetadataDatabase();
76 76
77 private: 77 private:
78 typedef base::Callback<void(const SyncStatusCallback& callback)> Task; 78 typedef base::Callback<void(const SyncStatusCallback& callback)> Task;
79 79
80 void DidCreateMetadataDatabase(scoped_ptr<SyncTaskToken> token,
81 SyncStatusCode status,
82 scoped_ptr<MetadataDatabase> instance);
83
84 void GetAboutResource(scoped_ptr<SyncTaskToken> token); 80 void GetAboutResource(scoped_ptr<SyncTaskToken> token);
85 void DidGetAboutResource( 81 void DidGetAboutResource(
86 scoped_ptr<SyncTaskToken> token, 82 scoped_ptr<SyncTaskToken> token,
87 google_apis::GDataErrorCode error, 83 google_apis::GDataErrorCode error,
88 scoped_ptr<google_apis::AboutResource> about_resource); 84 scoped_ptr<google_apis::AboutResource> about_resource);
89 void FindSyncRoot(scoped_ptr<SyncTaskToken> token); 85 void FindSyncRoot(scoped_ptr<SyncTaskToken> token);
90 void DidFindSyncRoot(scoped_ptr<SyncTaskToken> token, 86 void DidFindSyncRoot(scoped_ptr<SyncTaskToken> token,
91 google_apis::GDataErrorCode error, 87 google_apis::GDataErrorCode error,
92 scoped_ptr<google_apis::FileList> file_list); 88 scoped_ptr<google_apis::FileList> file_list);
93 void CreateSyncRoot(scoped_ptr<SyncTaskToken> token); 89 void CreateSyncRoot(scoped_ptr<SyncTaskToken> token);
94 void DidCreateSyncRoot(scoped_ptr<SyncTaskToken> token, 90 void DidCreateSyncRoot(scoped_ptr<SyncTaskToken> token,
95 google_apis::GDataErrorCode error, 91 google_apis::GDataErrorCode error,
96 scoped_ptr<google_apis::FileResource> entry); 92 scoped_ptr<google_apis::FileResource> entry);
97 void DetachSyncRoot(scoped_ptr<SyncTaskToken> token); 93 void DetachSyncRoot(scoped_ptr<SyncTaskToken> token);
98 void DidDetachSyncRoot(scoped_ptr<SyncTaskToken> token, 94 void DidDetachSyncRoot(scoped_ptr<SyncTaskToken> token,
99 google_apis::GDataErrorCode error); 95 google_apis::GDataErrorCode error);
100 void ListAppRootFolders(scoped_ptr<SyncTaskToken> token); 96 void ListAppRootFolders(scoped_ptr<SyncTaskToken> token);
101 void DidListAppRootFolders( 97 void DidListAppRootFolders(
102 scoped_ptr<SyncTaskToken> token, 98 scoped_ptr<SyncTaskToken> token,
103 google_apis::GDataErrorCode error, 99 google_apis::GDataErrorCode error,
104 scoped_ptr<google_apis::FileList> file_list); 100 scoped_ptr<google_apis::FileList> file_list);
105 void PopulateDatabase(scoped_ptr<SyncTaskToken> token); 101 void PopulateDatabase(scoped_ptr<SyncTaskToken> token);
106 void DidPopulateDatabase(scoped_ptr<SyncTaskToken> token,
107 SyncStatusCode status);
108 102
109 SyncEngineContext* sync_context_; // Not owned. 103 SyncEngineContext* sync_context_; // Not owned.
110 leveldb::Env* env_override_; 104 leveldb::Env* env_override_;
111 105
112 google_apis::CancelCallback cancel_callback_; 106 google_apis::CancelCallback cancel_callback_;
113 base::FilePath database_path_; 107 base::FilePath database_path_;
114 108
115 int find_sync_root_retry_count_; 109 int find_sync_root_retry_count_;
116 110
117 scoped_ptr<MetadataDatabase> metadata_database_; 111 scoped_ptr<MetadataDatabase> metadata_database_;
118 ScopedVector<google_apis::FileResource> app_root_folders_; 112 ScopedVector<google_apis::FileResource> app_root_folders_;
119 113
120 int64 largest_change_id_; 114 int64 largest_change_id_;
121 std::string root_folder_id_; 115 std::string root_folder_id_;
122 116
123 scoped_ptr<google_apis::FileResource> sync_root_folder_; 117 scoped_ptr<google_apis::FileResource> sync_root_folder_;
124 118
125 base::WeakPtrFactory<SyncEngineInitializer> weak_ptr_factory_; 119 base::WeakPtrFactory<SyncEngineInitializer> weak_ptr_factory_;
126 120
127 DISALLOW_COPY_AND_ASSIGN(SyncEngineInitializer); 121 DISALLOW_COPY_AND_ASSIGN(SyncEngineInitializer);
128 }; 122 };
129 123
130 } // namespace drive_backend 124 } // namespace drive_backend
131 } // namespace sync_file_system 125 } // namespace sync_file_system
132 126
133 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_INITIALIZER _H_ 127 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_INITIALIZER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698