OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_SIGNIN_IOS_BROWSER_ACCOUNT_CONSISTENCY_SERVICE_H_ | 5 #ifndef COMPONENTS_SIGNIN_IOS_BROWSER_ACCOUNT_CONSISTENCY_SERVICE_H_ |
6 #define COMPONENTS_SIGNIN_IOS_BROWSER_ACCOUNT_CONSISTENCY_SERVICE_H_ | 6 #define COMPONENTS_SIGNIN_IOS_BROWSER_ACCOUNT_CONSISTENCY_SERVICE_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <memory> | 10 #include <memory> |
11 #include <set> | 11 #include <set> |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "base/mac/scoped_nsobject.h" | |
15 #include "base/macros.h" | 14 #include "base/macros.h" |
16 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
17 #include "base/time/time.h" | 16 #include "base/time/time.h" |
18 #include "components/content_settings/core/browser/cookie_settings.h" | 17 #include "components/content_settings/core/browser/cookie_settings.h" |
19 #include "components/keyed_service/core/keyed_service.h" | 18 #include "components/keyed_service/core/keyed_service.h" |
20 #include "components/signin/core/browser/gaia_cookie_manager_service.h" | 19 #include "components/signin/core/browser/gaia_cookie_manager_service.h" |
21 #include "components/signin/core/browser/signin_manager.h" | 20 #include "components/signin/core/browser/signin_manager.h" |
22 #import "components/signin/ios/browser/manage_accounts_delegate.h" | 21 #import "components/signin/ios/browser/manage_accounts_delegate.h" |
23 #include "ios/web/public/active_state_manager.h" | 22 #include "ios/web/public/active_state_manager.h" |
24 | 23 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 170 |
172 // Whether a CHROME_CONNECTED cookie request is currently being applied. | 171 // Whether a CHROME_CONNECTED cookie request is currently being applied. |
173 bool applying_cookie_requests_; | 172 bool applying_cookie_requests_; |
174 // The queue of CHROME_CONNECTED cookie requests to be applied. | 173 // The queue of CHROME_CONNECTED cookie requests to be applied. |
175 std::deque<CookieRequest> cookie_requests_; | 174 std::deque<CookieRequest> cookie_requests_; |
176 // The map between domains where a CHROME_CONNECTED cookie is present and | 175 // The map between domains where a CHROME_CONNECTED cookie is present and |
177 // the time when the cookie was last updated. | 176 // the time when the cookie was last updated. |
178 std::map<std::string, base::Time> last_cookie_update_map_; | 177 std::map<std::string, base::Time> last_cookie_update_map_; |
179 | 178 |
180 // Web view used to apply the CHROME_CONNECTED cookie requests. | 179 // Web view used to apply the CHROME_CONNECTED cookie requests. |
181 base::scoped_nsobject<WKWebView> web_view_; | 180 __strong WKWebView* web_view_; |
182 // Navigation delegate of |web_view_| that informs the service when a cookie | 181 // Navigation delegate of |web_view_| that informs the service when a cookie |
183 // request has been applied. | 182 // request has been applied. |
184 base::scoped_nsobject<AccountConsistencyNavigationDelegate> | 183 AccountConsistencyNavigationDelegate* navigation_delegate_; |
185 navigation_delegate_; | |
186 | 184 |
187 // Handlers reacting on GAIA responses with the X-Chrome-Manage-Accounts | 185 // Handlers reacting on GAIA responses with the X-Chrome-Manage-Accounts |
188 // header set. | 186 // header set. |
189 std::map<web::WebState*, std::unique_ptr<web::WebStatePolicyDecider>> | 187 std::map<web::WebState*, std::unique_ptr<web::WebStatePolicyDecider>> |
190 web_state_handlers_; | 188 web_state_handlers_; |
191 | 189 |
192 DISALLOW_COPY_AND_ASSIGN(AccountConsistencyService); | 190 DISALLOW_COPY_AND_ASSIGN(AccountConsistencyService); |
193 }; | 191 }; |
194 | 192 |
195 #endif // COMPONENTS_SIGNIN_IOS_BROWSER_ACCOUNT_CONSISTENCY_SERVICE_H_ | 193 #endif // COMPONENTS_SIGNIN_IOS_BROWSER_ACCOUNT_CONSISTENCY_SERVICE_H_ |
OLD | NEW |