OLD | NEW |
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/sync_engine_initializer.
h" | 5 #include "chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.
h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/browser/drive/drive_api_service.h" | 10 #include "chrome/browser/drive/drive_api_service.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 return true; | 37 return true; |
38 } | 38 } |
39 return false; | 39 return false; |
40 } | 40 } |
41 | 41 |
42 bool LessOnCreationTime(const google_apis::FileResource& left, | 42 bool LessOnCreationTime(const google_apis::FileResource& left, |
43 const google_apis::FileResource& right) { | 43 const google_apis::FileResource& right) { |
44 return left.created_date() < right.created_date(); | 44 return left.created_date() < right.created_date(); |
45 } | 45 } |
46 | 46 |
47 typedef base::Callback<void(scoped_ptr<SyncTaskToken> token, | |
48 google_apis::GDataErrorCode error, | |
49 scoped_ptr<google_apis::ResourceList> resources)> | |
50 TokenAndResourceListCallback; | |
51 | |
52 // Functions above are for wrapping the access to legacy GData WAPI classes. | 47 // Functions above are for wrapping the access to legacy GData WAPI classes. |
53 //////////////////////////////////////////////////////////////////////////////// | 48 //////////////////////////////////////////////////////////////////////////////// |
54 | 49 |
55 } // namespace | 50 } // namespace |
56 | 51 |
57 SyncEngineInitializer::SyncEngineInitializer( | 52 SyncEngineInitializer::SyncEngineInitializer( |
58 SyncEngineContext* sync_context, | 53 SyncEngineContext* sync_context, |
59 const base::FilePath& database_path, | 54 const base::FilePath& database_path, |
60 leveldb::Env* env_override) | 55 leveldb::Env* env_override) |
61 : sync_context_(sync_context), | 56 : sync_context_(sync_context), |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 return; | 344 return; |
350 } | 345 } |
351 | 346 |
352 util::Log(logging::LOG_VERBOSE, FROM_HERE, | 347 util::Log(logging::LOG_VERBOSE, FROM_HERE, |
353 "[Initialize] Completed successfully."); | 348 "[Initialize] Completed successfully."); |
354 SyncTaskManager::NotifyTaskDone(token.Pass(), SYNC_STATUS_OK); | 349 SyncTaskManager::NotifyTaskDone(token.Pass(), SYNC_STATUS_OK); |
355 } | 350 } |
356 | 351 |
357 } // namespace drive_backend | 352 } // namespace drive_backend |
358 } // namespace sync_file_system | 353 } // namespace sync_file_system |
OLD | NEW |