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

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: rebase again 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 } 379 }
380 380
381 StrictMock<MockFileStatusObserver>* mock_file_status_observer() { 381 StrictMock<MockFileStatusObserver>* mock_file_status_observer() {
382 return &mock_file_status_observer_; 382 return &mock_file_status_observer_;
383 } 383 }
384 384
385 StrictMock<MockRemoteChangeProcessor>* mock_remote_processor() { 385 StrictMock<MockRemoteChangeProcessor>* mock_remote_processor() {
386 return &mock_remote_processor_; 386 return &mock_remote_processor_;
387 } 387 }
388 388
389 MessageLoop* message_loop() { return &message_loop_; } 389 base::MessageLoop* message_loop() { return &message_loop_; }
390 DriveFileSyncService* sync_service() { return sync_service_.get(); } 390 DriveFileSyncService* sync_service() { return sync_service_.get(); }
391 std::map<GURL, std::string>* pending_batch_sync_origins() { 391 std::map<GURL, std::string>* pending_batch_sync_origins() {
392 return &(sync_service()->pending_batch_sync_origins_); 392 return &(sync_service()->pending_batch_sync_origins_);
393 } 393 }
394 394
395 const RemoteChangeHandler& remote_change_handler() const { 395 const RemoteChangeHandler& remote_change_handler() const {
396 return sync_service_->remote_change_handler_; 396 return sync_service_->remote_change_handler_;
397 } 397 }
398 398
399 fileapi::FileSystemURL CreateURL(const GURL& origin, 399 fileapi::FileSystemURL CreateURL(const GURL& origin,
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 AddNewDirectory(parent_directory, directory_name, _)) 563 AddNewDirectory(parent_directory, directory_name, _))
564 .WillOnce(InvokeGetResourceEntryCallback2( 564 .WillOnce(InvokeGetResourceEntryCallback2(
565 google_apis::HTTP_SUCCESS, 565 google_apis::HTTP_SUCCESS,
566 base::Passed(&origin_directory_created))) 566 base::Passed(&origin_directory_created)))
567 .RetiresOnSaturation(); 567 .RetiresOnSaturation();
568 } 568 }
569 569
570 // End of mock setup helpers ----------------------------------------------- 570 // End of mock setup helpers -----------------------------------------------
571 571
572 private: 572 private:
573 MessageLoop message_loop_; 573 base::MessageLoop message_loop_;
574 content::TestBrowserThread ui_thread_; 574 content::TestBrowserThread ui_thread_;
575 content::TestBrowserThread file_thread_; 575 content::TestBrowserThread file_thread_;
576 576
577 base::ScopedTempDir base_dir_; 577 base::ScopedTempDir base_dir_;
578 scoped_ptr<TestingProfile> profile_; 578 scoped_ptr<TestingProfile> profile_;
579 579
580 #if defined OS_CHROMEOS 580 #if defined OS_CHROMEOS
581 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; 581 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_;
582 chromeos::ScopedTestCrosSettings test_cros_settings_; 582 chromeos::ScopedTestCrosSettings test_cros_settings_;
583 chromeos::ScopedTestUserManager test_user_manager_; 583 chromeos::ScopedTestUserManager test_user_manager_;
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 entry->set_kind(google_apis::ENTRY_KIND_FOLDER); 1035 entry->set_kind(google_apis::ENTRY_KIND_FOLDER);
1036 1036
1037 // Expect to drop this change for file. 1037 // Expect to drop this change for file.
1038 EXPECT_FALSE(AppendIncrementalRemoteChangeByEntry( 1038 EXPECT_FALSE(AppendIncrementalRemoteChangeByEntry(
1039 kOrigin, *entry, 1)); 1039 kOrigin, *entry, 1));
1040 } 1040 }
1041 1041
1042 #endif // !defined(OS_ANDROID) 1042 #endif // !defined(OS_ANDROID)
1043 1043
1044 } // namespace sync_file_system 1044 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698