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

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

Issue 120303003: [StorageMonitor] Move gallery name generation to StorageInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 6 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
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // as construction. 112 // as construction.
113 TestStorageMonitor::Destroy(); 113 TestStorageMonitor::Destroy();
114 114
115 ChromeRenderViewHostTestHarness::TearDown(); 115 ChromeRenderViewHostTestHarness::TearDown();
116 } 116 }
117 117
118 void MTPDeviceDelegateImplWinTest::ProcessAttach( 118 void MTPDeviceDelegateImplWinTest::ProcessAttach(
119 const std::string& id, 119 const std::string& id,
120 const base::string16& label, 120 const base::string16& label,
121 const base::FilePath::StringType& location) { 121 const base::FilePath::StringType& location) {
122 StorageInfo info(id, base::string16(), location, label, base::string16(), 122 StorageInfo info(id, location, label, base::string16(), base::string16(), 0);
123 base::string16(), 0);
124 monitor_->receiver()->ProcessAttach(info); 123 monitor_->receiver()->ProcessAttach(info);
125 } 124 }
126 125
127 std::string MTPDeviceDelegateImplWinTest::AttachDevice( 126 std::string MTPDeviceDelegateImplWinTest::AttachDevice(
128 StorageInfo::Type type, 127 StorageInfo::Type type,
129 const std::string& unique_id, 128 const std::string& unique_id,
130 const base::FilePath& location) { 129 const base::FilePath& location) {
131 std::string device_id = StorageInfo::MakeDeviceId(type, unique_id); 130 std::string device_id = StorageInfo::MakeDeviceId(type, unique_id);
132 DCHECK(StorageInfo::IsRemovableDevice(device_id)); 131 DCHECK(StorageInfo::IsRemovableDevice(device_id));
133 base::string16 label = location.LossyDisplayName(); 132 base::string16 label = location.LossyDisplayName();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 for (FSInfoMap::iterator i = results.begin(); i != results.end(); ++i) { 173 for (FSInfoMap::iterator i = results.begin(); i != results.end(); ++i) {
175 MediaFileSystemInfo info = i->second; 174 MediaFileSystemInfo info = i->second;
176 if (info.path == location) { 175 if (info.path == location) {
177 CheckGalleryInfo(info, location.LossyDisplayName(), location, true, true); 176 CheckGalleryInfo(info, location.LossyDisplayName(), location, true, true);
178 checked = true; 177 checked = true;
179 break; 178 break;
180 } 179 }
181 } 180 }
182 EXPECT_TRUE(checked); 181 EXPECT_TRUE(checked);
183 } 182 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698