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

Side by Side Diff: chrome/browser/chromeos/mock_disk_mount_manager.h

Issue 8499007: Add CrosDisksClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Split a part of code into disk_mount_manager.cc/h Created 9 years, 1 month 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_MOCK_DISK_MOUNT_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_MOCK_DISK_MOUNT_MANAGER_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/observer_list.h"
12 #include "base/time.h"
13 #include "chrome/browser/chromeos/disk_mount_manager.h"
14 #include "testing/gmock/include/gmock/gmock.h"
15 #include "testing/gtest/include/gtest/gtest.h"
16
17 namespace chromeos {
18
19 class MockDiskMountManager : public DiskMountManager {
20 public:
21 MockDiskMountManager();
22 virtual ~MockDiskMountManager();
23
24 MOCK_METHOD0(Init, void(void));
25 MOCK_METHOD1(AddObserver, void(DiskMountManager::Observer*));
26 MOCK_METHOD1(RemoveObserver, void(DiskMountManager::Observer*));
27 MOCK_CONST_METHOD0(disks, const DiskMountManager::DiskMap&(void));
28 MOCK_CONST_METHOD0(mount_points,
29 const DiskMountManager::MountPointMap&(void));
30 MOCK_METHOD0(RequestMountInfoRefresh, void(void));
31 MOCK_METHOD2(MountPath, void(const std::string&, MountType));
32 MOCK_METHOD1(UnmountPath, void(const std::string&));
33 MOCK_METHOD3(GetSizeStatsOnFileThread, void(const std::string&, size_t*,
34 size_t*));
35 MOCK_METHOD1(FormatUnmountedDevice, void(const std::string&));
36 MOCK_METHOD1(FormatMountedDevice, void(const std::string&));
37 MOCK_METHOD3(UnmountDeviceRecursive, void(const std::string&,
38 DiskMountManager::UnmountDeviceRecursiveCallbackType, void*));
39
40 void FireDeviceInsertEvents();
satorux1 2011/11/11 00:43:55 Fire -> Notify. Please add a function comment.
hashimoto 2011/11/11 08:00:53 Done.
41 void FireDeviceRemoveEvents();
42
43 void SetupDefaultReplies();
44
45 private:
46 void AddObserverInternal(DiskMountManager::Observer* observer);
satorux1 2011/11/11 00:43:55 function comment
hashimoto 2011/11/11 08:00:53 Done.
47 void RemoveObserverInternal(DiskMountManager::Observer* observer);
48 const DiskMountManager::DiskMap& disksInternal() const { return disks_; }
49
50
51 void UpdateDeviceChanged(DiskMountManagerEventType evt,
52 const std::string& path);
53 void UpdateDiskChanged(DiskMountManagerEventType evt,
54 const DiskMountManager::Disk* disk);
55
56 ObserverList<DiskMountManager::Observer> observers_;
57
58 // The list of disks found.
59 DiskMountManager::DiskMap disks_;
60
61 DISALLOW_COPY_AND_ASSIGN(MockDiskMountManager);
62 };
63
64 } // namespace chromeos
65
66 #endif // CHROME_BROWSER_CHROMEOS_MOCK_DISK_MOUNT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698