| 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_CHILD_ACCOUNTS_PERMISSION_REQUEST_CREATOR
_APIARY_H_ | 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_CHILD_ACCOUNTS_PERMISSION_REQUEST_CREATOR
_APIARY_H_ |
| 6 #define CHROME_BROWSER_SUPERVISED_USER_CHILD_ACCOUNTS_PERMISSION_REQUEST_CREATOR
_APIARY_H_ | 6 #define CHROME_BROWSER_SUPERVISED_USER_CHILD_ACCOUNTS_PERMISSION_REQUEST_CREATOR
_APIARY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 ~PermissionRequestCreatorApiary() override; | 36 ~PermissionRequestCreatorApiary() override; |
| 37 | 37 |
| 38 static scoped_ptr<PermissionRequestCreator> CreateWithProfile( | 38 static scoped_ptr<PermissionRequestCreator> CreateWithProfile( |
| 39 Profile* profile); | 39 Profile* profile); |
| 40 | 40 |
| 41 // PermissionRequestCreator implementation: | 41 // PermissionRequestCreator implementation: |
| 42 bool IsEnabled() const override; | 42 bool IsEnabled() const override; |
| 43 void CreateURLAccessRequest(const GURL& url_requested, | 43 void CreateURLAccessRequest(const GURL& url_requested, |
| 44 const SuccessCallback& callback) override; | 44 const SuccessCallback& callback) override; |
| 45 void CreateExtensionUpdateRequest(const std::string& extension_id, | 45 void CreateExtensionUpdateRequest(const std::string& extension_id, |
| 46 const base::Version& version, |
| 46 const SuccessCallback& callback) override; | 47 const SuccessCallback& callback) override; |
| 47 | 48 |
| 48 void set_url_fetcher_id_for_testing(int id) { url_fetcher_id_ = id; } | 49 void set_url_fetcher_id_for_testing(int id) { url_fetcher_id_ = id; } |
| 49 | 50 |
| 50 private: | 51 private: |
| 51 struct Request; | 52 struct Request; |
| 52 typedef ScopedVector<Request>::iterator RequestIterator; | 53 typedef ScopedVector<Request>::iterator RequestIterator; |
| 53 | 54 |
| 54 // OAuth2TokenService::Consumer implementation: | 55 // OAuth2TokenService::Consumer implementation: |
| 55 void OnGetTokenSuccess(const OAuth2TokenService::Request* request, | 56 void OnGetTokenSuccess(const OAuth2TokenService::Request* request, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 80 std::string account_id_; | 81 std::string account_id_; |
| 81 net::URLRequestContextGetter* context_; | 82 net::URLRequestContextGetter* context_; |
| 82 int url_fetcher_id_; | 83 int url_fetcher_id_; |
| 83 | 84 |
| 84 ScopedVector<Request> requests_; | 85 ScopedVector<Request> requests_; |
| 85 | 86 |
| 86 DISALLOW_COPY_AND_ASSIGN(PermissionRequestCreatorApiary); | 87 DISALLOW_COPY_AND_ASSIGN(PermissionRequestCreatorApiary); |
| 87 }; | 88 }; |
| 88 | 89 |
| 89 #endif // CHROME_BROWSER_SUPERVISED_USER_CHILD_ACCOUNTS_PERMISSION_REQUEST_CREA
TOR_APIARY_H_ | 90 #endif // CHROME_BROWSER_SUPERVISED_USER_CHILD_ACCOUNTS_PERMISSION_REQUEST_CREA
TOR_APIARY_H_ |
| OLD | NEW |