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

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

Issue 2662343003: Revert of Destroy MediaFileSystemRegistry before StorageMonitor in MTPDeviceDelegateImplWinTest. (Closed)
Patch Set: Created 3 years, 10 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 extension_system->CreateExtensionService( 104 extension_system->CreateExtensionService(
105 base::CommandLine::ForCurrentProcess(), base::FilePath(), false); 105 base::CommandLine::ForCurrentProcess(), base::FilePath(), false);
106 106
107 std::vector<std::string> all_permissions; 107 std::vector<std::string> all_permissions;
108 all_permissions.push_back("allAutoDetected"); 108 all_permissions.push_back("allAutoDetected");
109 all_permissions.push_back("read"); 109 all_permissions.push_back("read");
110 extension_ = AddMediaGalleriesApp("all", all_permissions, profile()); 110 extension_ = AddMediaGalleriesApp("all", all_permissions, profile());
111 } 111 }
112 112
113 void MTPDeviceDelegateImplWinTest::TearDown() { 113 void MTPDeviceDelegateImplWinTest::TearDown() {
114 // The MediaFileSystemRegistry owned by the TestingBrowserProcess must be
115 // destroyed before the StorageMonitor because it calls
116 // StorageMonitor::RemoveObserver() in its destructor.
117 TestingBrowserProcess::DeleteInstance();
118
119 // Windows storage monitor must be destroyed on the same thread 114 // Windows storage monitor must be destroyed on the same thread
120 // as construction. 115 // as construction.
121 TestStorageMonitor::Destroy(); 116 TestStorageMonitor::Destroy();
122 117
123 ChromeRenderViewHostTestHarness::TearDown(); 118 ChromeRenderViewHostTestHarness::TearDown();
124 } 119 }
125 120
126 void MTPDeviceDelegateImplWinTest::ProcessAttach( 121 void MTPDeviceDelegateImplWinTest::ProcessAttach(
127 const std::string& id, 122 const std::string& id,
128 const base::string16& label, 123 const base::string16& label,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 for (FSInfoMap::iterator i = results.begin(); i != results.end(); ++i) { 175 for (FSInfoMap::iterator i = results.begin(); i != results.end(); ++i) {
181 MediaFileSystemInfo info = i->second; 176 MediaFileSystemInfo info = i->second;
182 if (info.path == location) { 177 if (info.path == location) {
183 CheckGalleryInfo(info, location.LossyDisplayName(), location, true, true); 178 CheckGalleryInfo(info, location.LossyDisplayName(), location, true, true);
184 checked = true; 179 checked = true;
185 break; 180 break;
186 } 181 }
187 } 182 }
188 EXPECT_TRUE(checked); 183 EXPECT_TRUE(checked);
189 } 184 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698