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

Side by Side Diff: chrome/browser/chromeos/dbus/mock_cryptohome_client.h

Issue 9466005: Make sure the device recovers from policy loss in the consumer case. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to ToT and cleaned up the unit tests. Created 8 years, 9 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
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 #ifndef CHROME_BROWSER_CHROMEOS_DBUS_MOCK_CRYPTOHOME_CLIENT_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DBUS_MOCK_CRYPTOHOME_CLIENT_H_
6 #define CHROME_BROWSER_CHROMEOS_DBUS_MOCK_CRYPTOHOME_CLIENT_H_ 6 #define CHROME_BROWSER_CHROMEOS_DBUS_MOCK_CRYPTOHOME_CLIENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "chrome/browser/chromeos/dbus/cryptohome_client.h" 11 #include "chrome/browser/chromeos/dbus/cryptohome_client.h"
12 #include "testing/gmock/include/gmock/gmock.h" 12 #include "testing/gmock/include/gmock/gmock.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 class MockCryptohomeClient : public CryptohomeClient { 16 class MockCryptohomeClient : public CryptohomeClient {
17 public: 17 public:
18 MockCryptohomeClient(); 18 MockCryptohomeClient();
19 virtual ~MockCryptohomeClient(); 19 virtual ~MockCryptohomeClient();
20 20
21 MOCK_METHOD1(SetAsyncCallStatusHandler, void(AsyncCallStatusHandler handler)); 21 MOCK_METHOD1(SetAsyncCallStatusHandler, void(AsyncCallStatusHandler handler));
22 MOCK_METHOD0(ResetAsyncCallStatusHandler, void()); 22 MOCK_METHOD0(ResetAsyncCallStatusHandler, void());
23 MOCK_METHOD1(IsMounted, bool(bool* is_mounted)); 23 MOCK_METHOD1(IsMounted, bool(bool* is_mounted));
24 MOCK_METHOD1(Unmount, bool(bool* success));
24 MOCK_METHOD3(AsyncCheckKey, 25 MOCK_METHOD3(AsyncCheckKey,
25 void(const std::string& username, 26 void(const std::string& username,
26 const std::string& key, 27 const std::string& key,
27 base::Callback<void(int async_id)> callback)); 28 base::Callback<void(int async_id)> callback));
28 MOCK_METHOD4(AsyncMigrateKey, 29 MOCK_METHOD4(AsyncMigrateKey,
29 void(const std::string& username, 30 void(const std::string& username,
30 const std::string& from_key, 31 const std::string& from_key,
31 const std::string& to_key, 32 const std::string& to_key,
32 base::Callback<void(int async_id)> callback)); 33 base::Callback<void(int async_id)> callback));
33 MOCK_METHOD2(AsyncRemove, void(const std::string& username, 34 MOCK_METHOD2(AsyncRemove, void(const std::string& username,
(...skipping 26 matching lines...) Expand all
60 bool* successful)); 61 bool* successful));
61 MOCK_METHOD1(InstallAttributesFinalize, bool(bool* successful)); 62 MOCK_METHOD1(InstallAttributesFinalize, bool(bool* successful));
62 MOCK_METHOD1(InstallAttributesIsReady, bool(bool* is_ready)); 63 MOCK_METHOD1(InstallAttributesIsReady, bool(bool* is_ready));
63 MOCK_METHOD1(InstallAttributesIsInvalid, bool(bool* is_invalid)); 64 MOCK_METHOD1(InstallAttributesIsInvalid, bool(bool* is_invalid));
64 MOCK_METHOD1(InstallAttributesIsFirstInstall, bool(bool* is_first_install)); 65 MOCK_METHOD1(InstallAttributesIsFirstInstall, bool(bool* is_first_install));
65 }; 66 };
66 67
67 } // namespace chromeos 68 } // namespace chromeos
68 69
69 #endif // CHROME_BROWSER_CHROMEOS_DBUS_MOCK_CRYPTOHOME_CLIENT_H_ 70 #endif // CHROME_BROWSER_CHROMEOS_DBUS_MOCK_CRYPTOHOME_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/dbus/cryptohome_client.cc ('k') | chrome/browser/chromeos/device_settings_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698