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

Side by Side Diff: chrome/browser/media_galleries/win/mtp_device_delegate_impl_win_unittest.cc

Issue 24269007: Media Galleries API: Fix MediaGalleriesPreferences finders race. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 <vector> 5 #include <vector>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void CheckGalleryInfo(const MediaFileSystemInfo& info, 57 void CheckGalleryInfo(const MediaFileSystemInfo& info,
58 const string16& name, 58 const string16& name,
59 const base::FilePath& path, 59 const base::FilePath& path,
60 bool removable, 60 bool removable,
61 bool media_device); 61 bool media_device);
62 62
63 // Pointer to the storage monitor. Owned by TestingBrowserProcess. 63 // Pointer to the storage monitor. Owned by TestingBrowserProcess.
64 TestStorageMonitorWin* monitor_; 64 TestStorageMonitorWin* monitor_;
65 scoped_refptr<extensions::Extension> extension_; 65 scoped_refptr<extensions::Extension> extension_;
66 66
67 EnsureMediaDirectoriesExists media_directories_; 67 TestMediaDirectoriesOverrides media_directories_;
68 }; 68 };
69 69
70 void MTPDeviceDelegateImplWinTest::SetUp() { 70 void MTPDeviceDelegateImplWinTest::SetUp() {
71 ChromeRenderViewHostTestHarness::SetUp(); 71 ChromeRenderViewHostTestHarness::SetUp();
72 72
73 TestStorageMonitor::RemoveSingleton(); 73 TestStorageMonitor::RemoveSingleton();
74 TestPortableDeviceWatcherWin* portable_device_watcher = 74 TestPortableDeviceWatcherWin* portable_device_watcher =
75 new TestPortableDeviceWatcherWin; 75 new TestPortableDeviceWatcherWin;
76 TestVolumeMountWatcherWin* mount_watcher = new TestVolumeMountWatcherWin; 76 TestVolumeMountWatcherWin* mount_watcher = new TestVolumeMountWatcherWin;
77 portable_device_watcher->set_use_dummy_mtp_storage_info(true); 77 portable_device_watcher->set_use_dummy_mtp_storage_info(true);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 for (FSInfoMap::iterator i = results.begin(); i != results.end(); ++i) { 164 for (FSInfoMap::iterator i = results.begin(); i != results.end(); ++i) {
165 MediaFileSystemInfo info = i->second; 165 MediaFileSystemInfo info = i->second;
166 if (info.path == location) { 166 if (info.path == location) {
167 CheckGalleryInfo(info, location.LossyDisplayName(), location, true, true); 167 CheckGalleryInfo(info, location.LossyDisplayName(), location, true, true);
168 checked = true; 168 checked = true;
169 break; 169 break;
170 } 170 }
171 } 171 }
172 EXPECT_TRUE(checked); 172 EXPECT_TRUE(checked);
173 } 173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698