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

Side by Side Diff: components/storage_monitor/storage_monitor_win_unittest.cc

Issue 974633002: Hotlist Slow: Remove extra thread pool created by VolumeMountWatcherWin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix const char Created 5 years, 9 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
« no previous file with comments | « no previous file | components/storage_monitor/test_volume_mount_watcher_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <windows.h> 5 #include <windows.h>
6 #include <dbt.h> 6 #include <dbt.h>
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 new TestPortableDeviceWatcherWin)); 90 new TestPortableDeviceWatcherWin));
91 91
92 monitor_->Init(); 92 monitor_->Init();
93 RunUntilIdle(); 93 RunUntilIdle();
94 monitor_->AddObserver(&observer_); 94 monitor_->AddObserver(&observer_);
95 } 95 }
96 96
97 void StorageMonitorWinTest::TearDown() { 97 void StorageMonitorWinTest::TearDown() {
98 RunUntilIdle(); 98 RunUntilIdle();
99 monitor_->RemoveObserver(&observer_); 99 monitor_->RemoveObserver(&observer_);
100 volume_mount_watcher_->ShutdownWorkerPool();
101 100
102 // Windows storage monitor must be destroyed on the same thread 101 // Windows storage monitor must be destroyed on the same thread
103 // as construction. 102 // as construction.
104 monitor_.reset(); 103 monitor_.reset();
105 } 104 }
106 105
107 void StorageMonitorWinTest::PreAttachDevices() { 106 void StorageMonitorWinTest::PreAttachDevices() {
108 monitor_.reset(); 107 monitor_.reset();
109 volume_mount_watcher_ = new TestVolumeMountWatcherWin; 108 volume_mount_watcher_ = new TestVolumeMountWatcherWin;
110 volume_mount_watcher_->SetAttachedDevicesFake(); 109 volume_mount_watcher_->SetAttachedDevicesFake();
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 TestPortableDeviceWatcherWin::kMTPDeviceWithValidInfo); 539 TestPortableDeviceWatcherWin::kMTPDeviceWithValidInfo);
541 EXPECT_EQ(expected, pnp_device_id); 540 EXPECT_EQ(expected, pnp_device_id);
542 EXPECT_EQ(it->object_persistent_id, 541 EXPECT_EQ(it->object_persistent_id,
543 TestPortableDeviceWatcherWin::GetMTPStorageUniqueId( 542 TestPortableDeviceWatcherWin::GetMTPStorageUniqueId(
544 pnp_device_id, storage_object_id)); 543 pnp_device_id, storage_object_id));
545 } 544 }
546 DoMTPDeviceTest(TestPortableDeviceWatcherWin::kMTPDeviceWithValidInfo, false); 545 DoMTPDeviceTest(TestPortableDeviceWatcherWin::kMTPDeviceWithValidInfo, false);
547 } 546 }
548 547
549 } // namespace storage_monitor 548 } // namespace storage_monitor
OLDNEW
« no previous file with comments | « no previous file | components/storage_monitor/test_volume_mount_watcher_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698