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

Side by Side Diff: chrome/browser/chromeos/drive/drive_scheduler_unittest.cc

Issue 14118006: Change owner of DriveScheduler from DriveFileSystem to DriveSystemService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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/chromeos/drive/drive_scheduler.h" 5 #include "chrome/browser/chromeos/drive/drive_scheduler.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 fake_drive_service_.reset(new google_apis::FakeDriveService()); 61 fake_drive_service_.reset(new google_apis::FakeDriveService());
62 fake_drive_service_->LoadResourceListForWapi( 62 fake_drive_service_->LoadResourceListForWapi(
63 "chromeos/gdata/root_feed.json"); 63 "chromeos/gdata/root_feed.json");
64 fake_drive_service_->LoadAccountMetadataForWapi( 64 fake_drive_service_->LoadAccountMetadataForWapi(
65 "chromeos/gdata/account_metadata.json"); 65 "chromeos/gdata/account_metadata.json");
66 fake_drive_service_->LoadAppListForDriveApi( 66 fake_drive_service_->LoadAppListForDriveApi(
67 "chromeos/drive/applist.json"); 67 "chromeos/drive/applist.json");
68 68
69 scheduler_.reset(new DriveScheduler(profile_.get(), 69 scheduler_.reset(new DriveScheduler(profile_.get(),
70 fake_drive_service_.get())); 70 fake_drive_service_.get()));
71
72 scheduler_->Initialize();
73 scheduler_->SetDisableThrottling(true); 71 scheduler_->SetDisableThrottling(true);
74 } 72 }
75 73
76 virtual void TearDown() OVERRIDE { 74 virtual void TearDown() OVERRIDE {
77 // The scheduler should be deleted before NetworkLibrary, as it 75 // The scheduler should be deleted before NetworkLibrary, as it
78 // registers itself as observer of NetworkLibrary. 76 // registers itself as observer of NetworkLibrary.
79 scheduler_.reset(); 77 scheduler_.reset();
80 google_apis::test_util::RunBlockingPoolTask(); 78 google_apis::test_util::RunBlockingPoolTask();
81 fake_drive_service_.reset(); 79 fake_drive_service_.reset();
82 mock_network_change_notifier_.reset(); 80 mock_network_change_notifier_.reset();
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 720
723 // Run the background downloading job as well. 721 // Run the background downloading job as well.
724 ConnectToWifi(); 722 ConnectToWifi();
725 google_apis::test_util::RunBlockingPoolTask(); 723 google_apis::test_util::RunBlockingPoolTask();
726 724
727 // All jobs should have finished. 725 // All jobs should have finished.
728 EXPECT_EQ(0U, scheduler_->GetJobInfoList().size()); 726 EXPECT_EQ(0U, scheduler_->GetJobInfoList().size());
729 } 727 }
730 728
731 } // namespace drive 729 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/drive_scheduler.cc ('k') | chrome/browser/chromeos/drive/drive_system_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698