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

Side by Side Diff: chromeos/disks/mock_disk_mount_manager.cc

Issue 10874067: chromeos: Move src/chrome/browser/chromeos/disks to src/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « chromeos/disks/mock_disk_mount_manager.h ('k') | 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 (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 #include "chrome/browser/chromeos/disks/mock_disk_mount_manager.h" 5 #include "chromeos/disks/mock_disk_mount_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "content/public/browser/browser_thread.h"
13 12
14 using content::BrowserThread;
15 using testing::_; 13 using testing::_;
16 using testing::AnyNumber; 14 using testing::AnyNumber;
17 using testing::Invoke; 15 using testing::Invoke;
18 using testing::ReturnRef; 16 using testing::ReturnRef;
19 17
20 namespace chromeos { 18 namespace chromeos {
21 namespace disks { 19 namespace disks {
22 20
23 namespace { 21 namespace {
24 22
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 const DiskMountManager::Disk* 208 const DiskMountManager::Disk*
211 MockDiskMountManager::FindDiskBySourcePathInternal( 209 MockDiskMountManager::FindDiskBySourcePathInternal(
212 const std::string& source_path) const { 210 const std::string& source_path) const {
213 DiskMap::const_iterator disk_it = disks_.find(source_path); 211 DiskMap::const_iterator disk_it = disks_.find(source_path);
214 return disk_it == disks_.end() ? NULL : disk_it->second; 212 return disk_it == disks_.end() ? NULL : disk_it->second;
215 } 213 }
216 214
217 void MockDiskMountManager::NotifyDiskChanged( 215 void MockDiskMountManager::NotifyDiskChanged(
218 DiskMountManagerEventType event, 216 DiskMountManagerEventType event,
219 const DiskMountManager::Disk* disk) { 217 const DiskMountManager::Disk* disk) {
220 // Make sure we run on UI thread.
221 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
222
223 FOR_EACH_OBSERVER(Observer, observers_, DiskChanged(event, disk)); 218 FOR_EACH_OBSERVER(Observer, observers_, DiskChanged(event, disk));
224 } 219 }
225 220
226 void MockDiskMountManager::NotifyDeviceChanged(DiskMountManagerEventType event, 221 void MockDiskMountManager::NotifyDeviceChanged(DiskMountManagerEventType event,
227 const std::string& path) { 222 const std::string& path) {
228 // Make sure we run on UI thread.
229 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
230
231 FOR_EACH_OBSERVER(Observer, observers_, DeviceChanged(event, path)); 223 FOR_EACH_OBSERVER(Observer, observers_, DeviceChanged(event, path));
232 } 224 }
233 225
234 } // namespace disks 226 } // namespace disks
235 } // namespace chromeos 227 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/disks/mock_disk_mount_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698