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

Side by Side Diff: chrome/browser/chromeos/drive/file_system/create_directory_operation_unittest.cc

Issue 13448003: Narrow the ownership of DriveUploader from DriveSystemService to DriveScheduler. (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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/chromeos/drive/file_system/create_directory_operation.h " 5 #include "chrome/browser/chromeos/drive/file_system/create_directory_operation.h "
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/threading/sequenced_worker_pool.h" 8 #include "base/threading/sequenced_worker_pool.h"
9 #include "chrome/browser/chromeos/drive/change_list_loader.h" 9 #include "chrome/browser/chromeos/drive/change_list_loader.h"
10 #include "chrome/browser/chromeos/drive/drive_cache.h" 10 #include "chrome/browser/chromeos/drive/drive_cache.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 cache_->GetCacheDirectoryPath(DriveCache::CACHE_TYPE_META), 58 cache_->GetCacheDirectoryPath(DriveCache::CACHE_TYPE_META),
59 blocking_task_runner_)); 59 blocking_task_runner_));
60 60
61 DriveFileError error = DRIVE_FILE_ERROR_FAILED; 61 DriveFileError error = DRIVE_FILE_ERROR_FAILED;
62 metadata_->Initialize( 62 metadata_->Initialize(
63 google_apis::test_util::CreateCopyResultCallback(&error)); 63 google_apis::test_util::CreateCopyResultCallback(&error));
64 google_apis::test_util::RunBlockingPoolTask(); 64 google_apis::test_util::RunBlockingPoolTask();
65 ASSERT_EQ(DRIVE_FILE_OK, error); 65 ASSERT_EQ(DRIVE_FILE_OK, error);
66 66
67 scheduler_.reset( 67 scheduler_.reset(
68 new DriveScheduler(profile_.get(), fake_drive_service_.get(), NULL)); 68 new DriveScheduler(profile_.get(), fake_drive_service_.get()));
69 scheduler_->Initialize(); 69 scheduler_->Initialize();
70 70
71 drive_web_apps_registry_.reset(new DriveWebAppsRegistry); 71 drive_web_apps_registry_.reset(new DriveWebAppsRegistry);
72 72
73 change_list_loader_.reset(new ChangeListLoader( 73 change_list_loader_.reset(new ChangeListLoader(
74 metadata_.get(), scheduler_.get(), drive_web_apps_registry_.get())); 74 metadata_.get(), scheduler_.get(), drive_web_apps_registry_.get()));
75 75
76 change_list_loader_->LoadFromServerIfNeeded( 76 change_list_loader_->LoadFromServerIfNeeded(
77 DirectoryFetchInfo(), 77 DirectoryFetchInfo(),
78 google_apis::test_util::CreateCopyResultCallback(&error)); 78 google_apis::test_util::CreateCopyResultCallback(&error));
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 operation()->FindFirstMissingParentDirectory( 184 operation()->FindFirstMissingParentDirectory(
185 base::FilePath(FILE_PATH_LITERAL("drive/Directory 1")), 185 base::FilePath(FILE_PATH_LITERAL("drive/Directory 1")),
186 google_apis::test_util::CreateCopyResultCallback(&result)); 186 google_apis::test_util::CreateCopyResultCallback(&result));
187 google_apis::test_util::RunBlockingPoolTask(); 187 google_apis::test_util::RunBlockingPoolTask();
188 EXPECT_EQ(CreateDirectoryOperation::FIND_FIRST_DIRECTORY_ALREADY_PRESENT, 188 EXPECT_EQ(CreateDirectoryOperation::FIND_FIRST_DIRECTORY_ALREADY_PRESENT,
189 result.error); 189 result.error);
190 } 190 }
191 191
192 } // namespace file_system 192 } // namespace file_system
193 } // namespace drive 193 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/drive_system_service.cc ('k') | chrome/browser/chromeos/drive/file_system/drive_operations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698