OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/cros/mock_mount_library.h" | 5 #include "chrome/browser/chromeos/cros/mock_mount_library.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "chrome/browser/chromeos/cros/cros_library.h" | 9 #include "chrome/browser/chromeos/cros/cros_library.h" |
10 #include "content/browser/browser_thread.h" | 10 #include "content/browser/browser_thread.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 EXPECT_CALL(*this, RemoveObserver(_)) | 125 EXPECT_CALL(*this, RemoveObserver(_)) |
126 .Times(AnyNumber()); | 126 .Times(AnyNumber()); |
127 EXPECT_CALL(*this, disks()) | 127 EXPECT_CALL(*this, disks()) |
128 .WillRepeatedly(ReturnRef(disks_)); | 128 .WillRepeatedly(ReturnRef(disks_)); |
129 EXPECT_CALL(*this, RequestMountInfoRefresh()) | 129 EXPECT_CALL(*this, RequestMountInfoRefresh()) |
130 .Times(AnyNumber()); | 130 .Times(AnyNumber()); |
131 EXPECT_CALL(*this, MountPath(_, _, _)) | 131 EXPECT_CALL(*this, MountPath(_, _, _)) |
132 .Times(AnyNumber()); | 132 .Times(AnyNumber()); |
133 EXPECT_CALL(*this, UnmountPath(_)) | 133 EXPECT_CALL(*this, UnmountPath(_)) |
134 .Times(AnyNumber()); | 134 .Times(AnyNumber()); |
| 135 EXPECT_CALL(*this, FormatUnmountedDevice(_)) |
| 136 .Times(AnyNumber()); |
| 137 EXPECT_CALL(*this, FormatMountedDevice(_)) |
| 138 .Times(AnyNumber()); |
135 EXPECT_CALL(*this, UnmountDeviceRecursive(_, _, _)) | 139 EXPECT_CALL(*this, UnmountDeviceRecursive(_, _, _)) |
136 .Times(AnyNumber()); | 140 .Times(AnyNumber()); |
137 } | 141 } |
138 | 142 |
139 void MockMountLibrary::UpdateDiskChanged(MountLibraryEventType evt, | 143 void MockMountLibrary::UpdateDiskChanged(MountLibraryEventType evt, |
140 const MountLibrary::Disk* disk) { | 144 const MountLibrary::Disk* disk) { |
141 // Make sure we run on UI thread. | 145 // Make sure we run on UI thread. |
142 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 146 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
143 | 147 |
144 FOR_EACH_OBSERVER(Observer, observers_, DiskChanged(evt, disk)); | 148 FOR_EACH_OBSERVER(Observer, observers_, DiskChanged(evt, disk)); |
145 } | 149 } |
146 | 150 |
147 | 151 |
148 void MockMountLibrary::UpdateDeviceChanged(MountLibraryEventType evt, | 152 void MockMountLibrary::UpdateDeviceChanged(MountLibraryEventType evt, |
149 const std::string& path) { | 153 const std::string& path) { |
150 // Make sure we run on UI thread. | 154 // Make sure we run on UI thread. |
151 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 155 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
152 | 156 |
153 FOR_EACH_OBSERVER(Observer, observers_, DeviceChanged(evt, path)); | 157 FOR_EACH_OBSERVER(Observer, observers_, DeviceChanged(evt, path)); |
154 } | 158 } |
155 | 159 |
156 } // namespace chromeos | 160 } // namespace chromeos |
OLD | NEW |