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

Side by Side Diff: chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_file_sync_service.h" 5 #include "chrome/browser/sync_file_system/drive_file_sync_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 RemoveResourceFromDirectory(kRootResourceId, _, _)) 275 RemoveResourceFromDirectory(kRootResourceId, _, _))
276 .Times(AnyNumber()); 276 .Times(AnyNumber());
277 277
278 api_util_ = drive::APIUtil::CreateForTesting( 278 api_util_ = drive::APIUtil::CreateForTesting(
279 profile_.get(), 279 profile_.get(),
280 GURL(google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction), 280 GURL(google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction),
281 scoped_ptr<DriveServiceInterface>(mock_drive_service_), 281 scoped_ptr<DriveServiceInterface>(mock_drive_service_),
282 scoped_ptr<DriveUploaderInterface>()).Pass(); 282 scoped_ptr<DriveUploaderInterface>()).Pass();
283 ASSERT_TRUE(base_dir_.CreateUniqueTempDir()); 283 ASSERT_TRUE(base_dir_.CreateUniqueTempDir());
284 metadata_store_.reset(new DriveMetadataStore( 284 metadata_store_.reset(new DriveMetadataStore(
285 base_dir_.path(), base::MessageLoopProxy::current())); 285 base_dir_.path(), base::MessageLoopProxy::current().get()));
286 286
287 bool done = false; 287 bool done = false;
288 metadata_store_->Initialize(base::Bind(&DidInitialize, &done)); 288 metadata_store_->Initialize(base::Bind(&DidInitialize, &done));
289 message_loop_.RunUntilIdle(); 289 message_loop_.RunUntilIdle();
290 EXPECT_TRUE(done); 290 EXPECT_TRUE(done);
291 } 291 }
292 292
293 void SetUpDriveSyncService(bool enabled) { 293 void SetUpDriveSyncService(bool enabled) {
294 sync_service_ = DriveFileSyncService::CreateForTesting( 294 sync_service_ = DriveFileSyncService::CreateForTesting(
295 profile_.get(), 295 profile_.get(),
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 entry->set_kind(google_apis::ENTRY_KIND_FOLDER); 1030 entry->set_kind(google_apis::ENTRY_KIND_FOLDER);
1031 1031
1032 // Expect to drop this change for file. 1032 // Expect to drop this change for file.
1033 EXPECT_FALSE(AppendIncrementalRemoteChangeByEntry( 1033 EXPECT_FALSE(AppendIncrementalRemoteChangeByEntry(
1034 kOrigin, *entry, 1)); 1034 kOrigin, *entry, 1));
1035 } 1035 }
1036 1036
1037 #endif // !defined(OS_ANDROID) 1037 #endif // !defined(OS_ANDROID)
1038 1038
1039 } // namespace sync_file_system 1039 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698