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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/register_app_task_unittest.cc

Issue 73613003: [SyncFS] Add DriveUploader to SyncEngineContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 #include "chrome/browser/sync_file_system/drive_backend/register_app_task.h" 5 #include "chrome/browser/sync_file_system/drive_backend/register_app_task.h"
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
12 #include "chrome/browser/drive/drive_uploader.h"
12 #include "chrome/browser/drive/fake_drive_service.h" 13 #include "chrome/browser/drive/fake_drive_service.h"
13 #include "chrome/browser/google_apis/gdata_wapi_parser.h" 14 #include "chrome/browser/google_apis/gdata_wapi_parser.h"
14 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants. h" 15 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants. h"
15 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_util.h" 16 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_util.h"
16 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.h" 17 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.h"
17 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h" 18 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h"
18 #include "chrome/browser/sync_file_system/drive_backend/sync_engine_context.h" 19 #include "chrome/browser/sync_file_system/drive_backend/sync_engine_context.h"
19 #include "chrome/browser/sync_file_system/drive_backend_v1/fake_drive_service_he lper.h" 20 #include "chrome/browser/sync_file_system/drive_backend_v1/fake_drive_service_he lper.h"
20 #include "chrome/browser/sync_file_system/sync_file_system_test_util.h" 21 #include "chrome/browser/sync_file_system/sync_file_system_test_util.h"
21 #include "content/public/test/test_browser_thread_bundle.h" 22 #include "content/public/test/test_browser_thread_bundle.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 61
61 virtual void TearDown() OVERRIDE { 62 virtual void TearDown() OVERRIDE {
62 metadata_database_.reset(); 63 metadata_database_.reset();
63 base::RunLoop().RunUntilIdle(); 64 base::RunLoop().RunUntilIdle();
64 } 65 }
65 66
66 virtual drive::DriveServiceInterface* GetDriveService() OVERRIDE { 67 virtual drive::DriveServiceInterface* GetDriveService() OVERRIDE {
67 return fake_drive_service_.get(); 68 return fake_drive_service_.get();
68 } 69 }
69 70
71 virtual drive::DriveUploaderInterface* GetDriveUploader() OVERRIDE {
72 return NULL;
73 }
74
70 virtual MetadataDatabase* GetMetadataDatabase() OVERRIDE { 75 virtual MetadataDatabase* GetMetadataDatabase() OVERRIDE {
71 return metadata_database_.get(); 76 return metadata_database_.get();
72 } 77 }
73 78
74 virtual RemoteChangeProcessor* GetRemoteChangeProcessor() OVERRIDE { 79 virtual RemoteChangeProcessor* GetRemoteChangeProcessor() OVERRIDE {
75 return NULL; 80 return NULL;
76 } 81 }
77 82
78 protected: 83 protected:
79 scoped_ptr<leveldb::DB> OpenLevelDB() { 84 scoped_ptr<leveldb::DB> OpenLevelDB() {
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 319
315 CreateMetadataDatabase(db.Pass()); 320 CreateMetadataDatabase(db.Pass());
316 RunRegisterAppTask(kAppID); 321 RunRegisterAppTask(kAppID);
317 322
318 EXPECT_EQ(1u, CountRegisteredAppRoot()); 323 EXPECT_EQ(1u, CountRegisteredAppRoot());
319 EXPECT_TRUE(IsAppRegistered(kAppID)); 324 EXPECT_TRUE(IsAppRegistered(kAppID));
320 } 325 }
321 326
322 } // namespace drive_backend 327 } // namespace drive_backend
323 } // namespace sync_file_system 328 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698