OLD | NEW |
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 "chrome/browser/chromeos/disks/mock_disk_mount_manager.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 "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
10 | 10 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 void MockDiskMountManager::SetupDefaultReplies() { | 130 void MockDiskMountManager::SetupDefaultReplies() { |
131 EXPECT_CALL(*this, AddObserver(_)) | 131 EXPECT_CALL(*this, AddObserver(_)) |
132 .Times(AnyNumber()); | 132 .Times(AnyNumber()); |
133 EXPECT_CALL(*this, RemoveObserver(_)) | 133 EXPECT_CALL(*this, RemoveObserver(_)) |
134 .Times(AnyNumber()); | 134 .Times(AnyNumber()); |
135 EXPECT_CALL(*this, disks()) | 135 EXPECT_CALL(*this, disks()) |
136 .WillRepeatedly(ReturnRef(disks_)); | 136 .WillRepeatedly(ReturnRef(disks_)); |
137 EXPECT_CALL(*this, RequestMountInfoRefresh()) | 137 EXPECT_CALL(*this, RequestMountInfoRefresh()) |
138 .Times(AnyNumber()); | 138 .Times(AnyNumber()); |
139 EXPECT_CALL(*this, MountPath(_, _, _)) | 139 EXPECT_CALL(*this, MountPath(_, _, _, _)) |
140 .Times(AnyNumber()); | 140 .Times(AnyNumber()); |
141 EXPECT_CALL(*this, UnmountPath(_)) | 141 EXPECT_CALL(*this, UnmountPath(_)) |
142 .Times(AnyNumber()); | 142 .Times(AnyNumber()); |
143 EXPECT_CALL(*this, FormatUnmountedDevice(_)) | 143 EXPECT_CALL(*this, FormatUnmountedDevice(_)) |
144 .Times(AnyNumber()); | 144 .Times(AnyNumber()); |
145 EXPECT_CALL(*this, FormatMountedDevice(_)) | 145 EXPECT_CALL(*this, FormatMountedDevice(_)) |
146 .Times(AnyNumber()); | 146 .Times(AnyNumber()); |
147 EXPECT_CALL(*this, UnmountDeviceRecursive(_, _, _)) | 147 EXPECT_CALL(*this, UnmountDeviceRecursive(_, _, _)) |
148 .Times(AnyNumber()); | 148 .Times(AnyNumber()); |
149 } | 149 } |
(...skipping 10 matching lines...) Expand all Loading... |
160 void MockDiskMountManager::NotifyDeviceChanged(DiskMountManagerEventType event, | 160 void MockDiskMountManager::NotifyDeviceChanged(DiskMountManagerEventType event, |
161 const std::string& path) { | 161 const std::string& path) { |
162 // Make sure we run on UI thread. | 162 // Make sure we run on UI thread. |
163 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 163 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
164 | 164 |
165 FOR_EACH_OBSERVER(Observer, observers_, DeviceChanged(event, path)); | 165 FOR_EACH_OBSERVER(Observer, observers_, DeviceChanged(event, path)); |
166 } | 166 } |
167 | 167 |
168 } // namespace disks | 168 } // namespace disks |
169 } // namespace chromeos | 169 } // namespace chromeos |
OLD | NEW |