OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ |
6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ | 6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 bool AccessRequestsEnabled(); | 110 bool AccessRequestsEnabled(); |
111 | 111 |
112 // Adds an access request for the given URL. | 112 // Adds an access request for the given URL. |
113 void AddURLAccessRequest(const GURL& url, const SuccessCallback& callback); | 113 void AddURLAccessRequest(const GURL& url, const SuccessCallback& callback); |
114 | 114 |
115 // Adds an update request for the given WebStore item (App/Extension). | 115 // Adds an update request for the given WebStore item (App/Extension). |
116 void AddExtensionUpdateRequest(const std::string& extension_id, | 116 void AddExtensionUpdateRequest(const std::string& extension_id, |
117 const base::Version& version, | 117 const base::Version& version, |
118 const SuccessCallback& callback); | 118 const SuccessCallback& callback); |
119 | 119 |
| 120 // Same as above, but without a callback, just logging errors on failure. |
| 121 void AddExtensionUpdateRequest(const std::string& extension_id, |
| 122 const base::Version& version); |
| 123 |
| 124 // Get the string used to identify an extension update request. Public for |
| 125 // testing. |
| 126 static std::string GetExtensionUpdateRequestId( |
| 127 const std::string& extension_id, |
| 128 const base::Version& version); |
| 129 |
120 // Returns the email address of the custodian. | 130 // Returns the email address of the custodian. |
121 std::string GetCustodianEmailAddress() const; | 131 std::string GetCustodianEmailAddress() const; |
122 | 132 |
123 // Returns the name of the custodian, or the email address if the name is | 133 // Returns the name of the custodian, or the email address if the name is |
124 // empty. | 134 // empty. |
125 std::string GetCustodianName() const; | 135 std::string GetCustodianName() const; |
126 | 136 |
127 // Returns the email address of the second custodian, or the empty string | 137 // Returns the email address of the second custodian, or the empty string |
128 // if there is no second custodian. | 138 // if there is no second custodian. |
129 std::string GetSecondCustodianEmailAddress() const; | 139 std::string GetSecondCustodianEmailAddress() const; |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 | 373 |
364 // Used to create permission requests. | 374 // Used to create permission requests. |
365 ScopedVector<PermissionRequestCreator> permissions_creators_; | 375 ScopedVector<PermissionRequestCreator> permissions_creators_; |
366 | 376 |
367 base::ObserverList<SupervisedUserServiceObserver> observer_list_; | 377 base::ObserverList<SupervisedUserServiceObserver> observer_list_; |
368 | 378 |
369 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; | 379 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; |
370 }; | 380 }; |
371 | 381 |
372 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ | 382 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ |
OLD | NEW |