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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_MOCK_FILE_CACHE_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_MOCK_FILE_CACHE_OBSERVER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_MOCK_FILE_CACHE_OBSERVER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_MOCK_FILE_CACHE_OBSERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/chromeos/drive/file_cache_observer.h" | 10 #include "chrome/browser/chromeos/drive/file_cache_observer.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
12 | 12 |
13 namespace drive { | 13 namespace drive { |
14 | 14 |
15 // Mock for FileCacheObserver. | 15 // Mock for FileCacheObserver. |
16 class MockCacheObserver : public internal::FileCacheObserver { | 16 class MockCacheObserver : public internal::FileCacheObserver { |
17 public: | 17 public: |
18 MockCacheObserver(); | 18 MockCacheObserver(); |
19 virtual ~MockCacheObserver(); | 19 virtual ~MockCacheObserver(); |
20 | 20 |
21 MOCK_METHOD2(OnCachePinned, void(const std::string& resource_id, | 21 MOCK_METHOD2(OnCachePinned, void(const std::string& resource_id, |
22 const std::string& md5)); | 22 const std::string& md5)); |
23 MOCK_METHOD2(OnCacheUnpinned, void(const std::string& resource_id, | 23 MOCK_METHOD2(OnCacheUnpinned, void(const std::string& resource_id, |
24 const std::string& md5)); | 24 const std::string& md5)); |
25 MOCK_METHOD1(OnCacheCommitted, void(const std::string& resource_id)); | |
26 }; | 25 }; |
27 | 26 |
28 } // namespace drive | 27 } // namespace drive |
29 | 28 |
30 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_MOCK_FILE_CACHE_OBSERVER_H_ | 29 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_MOCK_FILE_CACHE_OBSERVER_H_ |
OLD | NEW |