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

Side by Side Diff: chrome/browser/chromeos/login/signed_settings_helper.h

Issue 8091002: PART2: Make SignedSettings use proper Value types instead of string all around the place. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased on ToT+Part1 and addressed comments. 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
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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_HELPER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_HELPER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_HELPER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_HELPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/values.h"
Mattias Nissler (ping if slow) 2011/11/18 14:24:42 forward decl?
pastarmovj 2011/11/22 12:13:58 Done.
11 #include "chrome/browser/chromeos/login/signed_settings.h" 12 #include "chrome/browser/chromeos/login/signed_settings.h"
12 13
13 namespace enterprise_management { 14 namespace enterprise_management {
14 class PolicyFetchResponse; 15 class PolicyFetchResponse;
15 } // namespace enterprise_management 16 } // namespace enterprise_management
16 namespace em = enterprise_management; 17 namespace em = enterprise_management;
17 namespace chromeos { 18 namespace chromeos {
18 19
19 class SignedSettings; 20 class SignedSettings;
20 21
(...skipping 14 matching lines...) Expand all
35 SignedSettings::ReturnCode code, const std::string& email) {} 36 SignedSettings::ReturnCode code, const std::string& email) {}
36 37
37 // Callback of WhitelistOp that removes |email| to the whitelist. 38 // Callback of WhitelistOp that removes |email| to the whitelist.
38 virtual void OnUnwhitelistCompleted( 39 virtual void OnUnwhitelistCompleted(
39 SignedSettings::ReturnCode code, const std::string& email) {} 40 SignedSettings::ReturnCode code, const std::string& email) {}
40 41
41 // Callback of StorePropertyOp. 42 // Callback of StorePropertyOp.
42 virtual void OnStorePropertyCompleted( 43 virtual void OnStorePropertyCompleted(
43 SignedSettings::ReturnCode code, 44 SignedSettings::ReturnCode code,
44 const std::string& name, 45 const std::string& name,
45 const std::string& value) {} 46 const base::Value& value) {}
46 47
47 // Callback of RetrievePropertyOp. 48 // Callback of RetrievePropertyOp.
48 virtual void OnRetrievePropertyCompleted( 49 virtual void OnRetrievePropertyCompleted(
49 SignedSettings::ReturnCode code, 50 SignedSettings::ReturnCode code,
50 const std::string& name, 51 const std::string& name,
51 const std::string& value) {} 52 const base::Value* value) {}
52 53
53 // Callback of StorePolicyOp. 54 // Callback of StorePolicyOp.
54 virtual void OnStorePolicyCompleted( 55 virtual void OnStorePolicyCompleted(
55 SignedSettings::ReturnCode code) {} 56 SignedSettings::ReturnCode code) {}
56 57
57 // Callback of RetrievePolicyOp. 58 // Callback of RetrievePolicyOp.
58 virtual void OnRetrievePolicyCompleted( 59 virtual void OnRetrievePolicyCompleted(
59 SignedSettings::ReturnCode code, 60 SignedSettings::ReturnCode code,
60 const em::PolicyFetchResponse& policy) {} 61 const em::PolicyFetchResponse& policy) {}
61 }; 62 };
62 63
63 // Class factory 64 // Class factory
64 static SignedSettingsHelper* Get(); 65 static SignedSettingsHelper* Get();
65 66
66 // Functions to start signed settings ops. 67 // Functions to start signed settings ops.
67 virtual void StartCheckWhitelistOp(const std::string& email, 68 virtual void StartCheckWhitelistOp(const std::string& email,
68 Callback* callback) = 0; 69 Callback* callback) = 0;
69 virtual void StartWhitelistOp(const std::string& email, 70 virtual void StartWhitelistOp(const std::string& email,
70 bool add_to_whitelist, 71 bool add_to_whitelist,
71 Callback* callback) = 0; 72 Callback* callback) = 0;
72 virtual void StartStorePropertyOp(const std::string& name, 73 virtual void StartStorePropertyOp(const std::string& name,
73 const std::string& value, 74 const base::Value& value,
74 Callback* callback) = 0; 75 Callback* callback) = 0;
75 virtual void StartRetrieveProperty(const std::string& name, 76 virtual void StartRetrieveProperty(const std::string& name,
76 Callback* callback) = 0; 77 Callback* callback) = 0;
77 virtual void StartStorePolicyOp(const em::PolicyFetchResponse& policy, 78 virtual void StartStorePolicyOp(const em::PolicyFetchResponse& policy,
78 Callback* callback) = 0; 79 Callback* callback) = 0;
79 virtual void StartRetrievePolicyOp(Callback* callback) = 0; 80 virtual void StartRetrievePolicyOp(Callback* callback) = 0;
80 81
81 // Cancels all pending calls of given callback. 82 // Cancels all pending calls of given callback.
82 virtual void CancelCallback(Callback* callback) = 0; 83 virtual void CancelCallback(Callback* callback) = 0;
83 84
(...skipping 13 matching lines...) Expand all
97 protected: 98 protected:
98 SignedSettingsHelper() : test_delegate_(NULL) { 99 SignedSettingsHelper() : test_delegate_(NULL) {
99 } 100 }
100 101
101 TestDelegate* test_delegate_; 102 TestDelegate* test_delegate_;
102 }; 103 };
103 104
104 } // namespace chromeos 105 } // namespace chromeos
105 106
106 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_HELPER_H_ 107 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698