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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 } 445 }
446 446
447 StrictMock<MockFileStatusObserver>* mock_file_status_observer() { 447 StrictMock<MockFileStatusObserver>* mock_file_status_observer() {
448 return &mock_file_status_observer_; 448 return &mock_file_status_observer_;
449 } 449 }
450 450
451 StrictMock<MockRemoteChangeProcessor>* mock_remote_processor() { 451 StrictMock<MockRemoteChangeProcessor>* mock_remote_processor() {
452 return &mock_remote_processor_; 452 return &mock_remote_processor_;
453 } 453 }
454 454
455 MessageLoop* message_loop() { return &message_loop_; } 455 base::MessageLoop* message_loop() { return &message_loop_; }
456 DriveFileSyncService* sync_service() { return sync_service_.get(); } 456 DriveFileSyncService* sync_service() { return sync_service_.get(); }
457 457
458 const DriveFileSyncService::PendingChangeQueue& pending_changes() const { 458 const DriveFileSyncService::PendingChangeQueue& pending_changes() const {
459 return sync_service_->pending_changes_; 459 return sync_service_->pending_changes_;
460 } 460 }
461 461
462 fileapi::FileSystemURL CreateURL(const GURL& origin, 462 fileapi::FileSystemURL CreateURL(const GURL& origin,
463 const base::FilePath::StringType& path) { 463 const base::FilePath::StringType& path) {
464 return CreateSyncableFileSystemURL( 464 return CreateSyncableFileSystemURL(
465 origin, kServiceName, base::FilePath(path)); 465 origin, kServiceName, base::FilePath(path));
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 AddNewDirectory(parent_directory, directory_name, _)) 625 AddNewDirectory(parent_directory, directory_name, _))
626 .WillOnce(InvokeGetResourceEntryCallback2( 626 .WillOnce(InvokeGetResourceEntryCallback2(
627 google_apis::HTTP_SUCCESS, 627 google_apis::HTTP_SUCCESS,
628 base::Passed(&origin_directory_created))) 628 base::Passed(&origin_directory_created)))
629 .RetiresOnSaturation(); 629 .RetiresOnSaturation();
630 } 630 }
631 631
632 // End of mock setup helpers ----------------------------------------------- 632 // End of mock setup helpers -----------------------------------------------
633 633
634 private: 634 private:
635 MessageLoop message_loop_; 635 base::MessageLoop message_loop_;
636 content::TestBrowserThread ui_thread_; 636 content::TestBrowserThread ui_thread_;
637 content::TestBrowserThread file_thread_; 637 content::TestBrowserThread file_thread_;
638 638
639 base::ScopedTempDir base_dir_; 639 base::ScopedTempDir base_dir_;
640 scoped_ptr<TestingProfile> profile_; 640 scoped_ptr<TestingProfile> profile_;
641 641
642 #if defined OS_CHROMEOS 642 #if defined OS_CHROMEOS
643 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; 643 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_;
644 chromeos::ScopedTestCrosSettings test_cros_settings_; 644 chromeos::ScopedTestCrosSettings test_cros_settings_;
645 chromeos::ScopedTestUserManager test_user_manager_; 645 chromeos::ScopedTestUserManager test_user_manager_;
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
1294 entry->set_kind(google_apis::ENTRY_KIND_FOLDER); 1294 entry->set_kind(google_apis::ENTRY_KIND_FOLDER);
1295 1295
1296 // Expect to drop this change for file. 1296 // Expect to drop this change for file.
1297 EXPECT_FALSE(AppendIncrementalRemoteChangeByEntry( 1297 EXPECT_FALSE(AppendIncrementalRemoteChangeByEntry(
1298 kOrigin, *entry, 1)); 1298 kOrigin, *entry, 1));
1299 } 1299 }
1300 1300
1301 #endif // !defined(OS_ANDROID) 1301 #endif // !defined(OS_ANDROID)
1302 1302
1303 } // namespace sync_file_system 1303 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698