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

Side by Side Diff: chrome/browser/media_galleries/media_file_system_registry_unittest.cc

Issue 16472007: Rename StorageMonitor Initialize function to EnsureInitialized for better understanding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comments 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
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 // MediaFileSystemRegistry unit tests. 5 // MediaFileSystemRegistry unit tests.
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 test::TestVolumeMountWatcherWin* mount_watcher = 764 test::TestVolumeMountWatcherWin* mount_watcher =
765 new test::TestVolumeMountWatcherWin; 765 new test::TestVolumeMountWatcherWin;
766 portable_device_watcher->set_use_dummy_mtp_storage_info(true); 766 portable_device_watcher->set_use_dummy_mtp_storage_info(true);
767 monitor_.reset(new test::TestStorageMonitorWin( 767 monitor_.reset(new test::TestStorageMonitorWin(
768 mount_watcher, portable_device_watcher)); 768 mount_watcher, portable_device_watcher));
769 #else 769 #else
770 monitor_.reset(new test::TestStorageMonitor()); 770 monitor_.reset(new test::TestStorageMonitor());
771 monitor_->MarkInitialized(); 771 monitor_->MarkInitialized();
772 #endif 772 #endif
773 base::RunLoop runloop; 773 base::RunLoop runloop;
774 monitor_->Initialize(runloop.QuitClosure()); 774 monitor_->EnsureInitialized(runloop.QuitClosure());
775 runloop.Run(); 775 runloop.Run();
776 776
777 DeleteContents(); 777 DeleteContents();
778 SetRenderProcessHostFactory(&rph_factory_); 778 SetRenderProcessHostFactory(&rph_factory_);
779 779
780 test_file_system_context_ = new TestMediaFileSystemContext( 780 test_file_system_context_ = new TestMediaFileSystemContext(
781 g_browser_process->media_file_system_registry()); 781 g_browser_process->media_file_system_registry());
782 782
783 #if defined(OS_CHROMEOS) 783 #if defined(OS_CHROMEOS)
784 test_user_manager_.reset(new chromeos::ScopedTestUserManager()); 784 test_user_manager_.reset(new chromeos::ScopedTestUserManager());
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 ASSERT_TRUE(PathService::Get(chrome::DIR_USER_VIDEOS, &path)); 1062 ASSERT_TRUE(PathService::Get(chrome::DIR_USER_VIDEOS, &path));
1063 profile_state->AddNameForAllCompare(path.BaseName().LossyDisplayName()); 1063 profile_state->AddNameForAllCompare(path.BaseName().LossyDisplayName());
1064 1064
1065 profile_state->CheckGalleries("names-dir", one_expectation, auto_galleries); 1065 profile_state->CheckGalleries("names-dir", one_expectation, auto_galleries);
1066 } else { 1066 } else {
1067 profile_state->CheckGalleries("names", one_expectation, one_expectation); 1067 profile_state->CheckGalleries("names", one_expectation, one_expectation);
1068 } 1068 }
1069 } 1069 }
1070 1070
1071 } // namespace chrome 1071 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698