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

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

Issue 16703025: [StorageMonitor] Move StorageMonitor ownership to BrowserProcessImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 it != registry->extension_hosts_map_.end(); 751 it != registry->extension_hosts_map_.end();
752 ++it) { 752 ++it) {
753 extension_galleries_host_count += it->second.size(); 753 extension_galleries_host_count += it->second.size();
754 } 754 }
755 return extension_galleries_host_count; 755 return extension_galleries_host_count;
756 } 756 }
757 757
758 758
759 void MediaFileSystemRegistryTest::SetUp() { 759 void MediaFileSystemRegistryTest::SetUp() {
760 ChromeRenderViewHostTestHarness::SetUp(); 760 ChromeRenderViewHostTestHarness::SetUp();
761 test::TestStorageMonitor::RemoveSingleton();
761 #if defined(OS_WIN) 762 #if defined(OS_WIN)
762 test::TestPortableDeviceWatcherWin* portable_device_watcher = 763 test::TestPortableDeviceWatcherWin* portable_device_watcher =
763 new test::TestPortableDeviceWatcherWin; 764 new test::TestPortableDeviceWatcherWin;
764 test::TestVolumeMountWatcherWin* mount_watcher = 765 test::TestVolumeMountWatcherWin* mount_watcher =
765 new test::TestVolumeMountWatcherWin; 766 new test::TestVolumeMountWatcherWin;
766 portable_device_watcher->set_use_dummy_mtp_storage_info(true); 767 portable_device_watcher->set_use_dummy_mtp_storage_info(true);
767 monitor_.reset(new test::TestStorageMonitorWin( 768 monitor_.reset(new test::TestStorageMonitorWin(
768 mount_watcher, portable_device_watcher)); 769 mount_watcher, portable_device_watcher));
769 #else 770 #else
770 monitor_.reset(new test::TestStorageMonitor()); 771 monitor_.reset(new test::TestStorageMonitor());
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 ASSERT_TRUE(PathService::Get(chrome::DIR_USER_VIDEOS, &path)); 1063 ASSERT_TRUE(PathService::Get(chrome::DIR_USER_VIDEOS, &path));
1063 profile_state->AddNameForAllCompare(path.BaseName().LossyDisplayName()); 1064 profile_state->AddNameForAllCompare(path.BaseName().LossyDisplayName());
1064 1065
1065 profile_state->CheckGalleries("names-dir", one_expectation, auto_galleries); 1066 profile_state->CheckGalleries("names-dir", one_expectation, auto_galleries);
1066 } else { 1067 } else {
1067 profile_state->CheckGalleries("names", one_expectation, one_expectation); 1068 profile_state->CheckGalleries("names", one_expectation, one_expectation);
1068 } 1069 }
1069 } 1070 }
1070 1071
1071 } // namespace chrome 1072 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698