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

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

Issue 59193003: [SyncFS] Add RemoteToLocalSyncer skeleton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 65
66 virtual drive::DriveServiceInterface* GetDriveService() OVERRIDE { 66 virtual drive::DriveServiceInterface* GetDriveService() OVERRIDE {
67 return fake_drive_service_.get(); 67 return fake_drive_service_.get();
68 } 68 }
69 69
70 virtual MetadataDatabase* GetMetadataDatabase() OVERRIDE { 70 virtual MetadataDatabase* GetMetadataDatabase() OVERRIDE {
71 return metadata_database_.get(); 71 return metadata_database_.get();
72 } 72 }
73 73
74 virtual RemoteChangeProcessor* GetRemoteChangeProcessor() OVERRIDE {
75 return NULL;
76 }
77
74 protected: 78 protected:
75 scoped_ptr<leveldb::DB> OpenLevelDB() { 79 scoped_ptr<leveldb::DB> OpenLevelDB() {
76 leveldb::DB* db = NULL; 80 leveldb::DB* db = NULL;
77 leveldb::Options options; 81 leveldb::Options options;
78 options.create_if_missing = true; 82 options.create_if_missing = true;
79 leveldb::Status status = 83 leveldb::Status status =
80 leveldb::DB::Open(options, database_dir_.path().AsUTF8Unsafe(), &db); 84 leveldb::DB::Open(options, database_dir_.path().AsUTF8Unsafe(), &db);
81 EXPECT_TRUE(status.ok()); 85 EXPECT_TRUE(status.ok());
82 return make_scoped_ptr<leveldb::DB>(db); 86 return make_scoped_ptr<leveldb::DB>(db);
83 } 87 }
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 314
311 CreateMetadataDatabase(db.Pass()); 315 CreateMetadataDatabase(db.Pass());
312 RunRegisterAppTask(kAppID); 316 RunRegisterAppTask(kAppID);
313 317
314 EXPECT_EQ(1u, CountRegisteredAppRoot()); 318 EXPECT_EQ(1u, CountRegisteredAppRoot());
315 EXPECT_TRUE(IsAppRegistered(kAppID)); 319 EXPECT_TRUE(IsAppRegistered(kAppID));
316 } 320 }
317 321
318 } // namespace drive_backend 322 } // namespace drive_backend
319 } // namespace sync_file_system 323 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698