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 24 matching lines...) Expand all Loading... |
35 net::URLRequestContextGetter* context); | 35 net::URLRequestContextGetter* context); |
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& id, |
46 const SuccessCallback& callback) override; | 46 const SuccessCallback& callback) override; |
47 | 47 |
48 void set_url_fetcher_id_for_testing(int id) { url_fetcher_id_ = id; } | 48 void set_url_fetcher_id_for_testing(int id) { url_fetcher_id_ = id; } |
49 | 49 |
50 private: | 50 private: |
51 struct Request; | 51 struct Request; |
52 typedef ScopedVector<Request>::iterator RequestIterator; | 52 typedef ScopedVector<Request>::iterator RequestIterator; |
53 | 53 |
54 // OAuth2TokenService::Consumer implementation: | 54 // OAuth2TokenService::Consumer implementation: |
55 void OnGetTokenSuccess(const OAuth2TokenService::Request* request, | 55 void OnGetTokenSuccess(const OAuth2TokenService::Request* request, |
(...skipping 24 matching lines...) Expand all Loading... |
80 std::string account_id_; | 80 std::string account_id_; |
81 net::URLRequestContextGetter* context_; | 81 net::URLRequestContextGetter* context_; |
82 int url_fetcher_id_; | 82 int url_fetcher_id_; |
83 | 83 |
84 ScopedVector<Request> requests_; | 84 ScopedVector<Request> requests_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(PermissionRequestCreatorApiary); | 86 DISALLOW_COPY_AND_ASSIGN(PermissionRequestCreatorApiary); |
87 }; | 87 }; |
88 | 88 |
89 #endif // CHROME_BROWSER_SUPERVISED_USER_CHILD_ACCOUNTS_PERMISSION_REQUEST_CREA
TOR_APIARY_H_ | 89 #endif // CHROME_BROWSER_SUPERVISED_USER_CHILD_ACCOUNTS_PERMISSION_REQUEST_CREA
TOR_APIARY_H_ |
OLD | NEW |