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 #include "ios/chrome/browser/signin/signin_client_impl.h" | 5 #include "ios/chrome/browser/signin/signin_client_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/guid.h" | 12 #include "base/guid.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/memory/ptr_util.h" |
14 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
15 #include "components/content_settings/core/browser/cookie_settings.h" | 16 #include "components/content_settings/core/browser/cookie_settings.h" |
16 #include "components/keyed_service/core/service_access_type.h" | 17 #include "components/keyed_service/core/service_access_type.h" |
17 #include "components/metrics/metrics_service.h" | 18 #include "components/metrics/metrics_service.h" |
18 #include "components/prefs/pref_service.h" | 19 #include "components/prefs/pref_service.h" |
19 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 20 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
20 #include "components/signin/core/browser/signin_cookie_changed_subscription.h" | 21 #include "components/signin/core/browser/signin_cookie_changed_subscription.h" |
21 #include "components/signin/core/browser/signin_header_helper.h" | 22 #include "components/signin/core/browser/signin_header_helper.h" |
22 #include "components/signin/ios/browser/profile_oauth2_token_service_ios_provide
r.h" | 23 #include "components/signin/ios/browser/profile_oauth2_token_service_ios_provide
r.h" |
23 #include "google_apis/gaia/gaia_constants.h" | 24 #include "google_apis/gaia/gaia_constants.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 | 225 |
225 void SigninClientImpl::DelayNetworkCall(const base::Closure& callback) { | 226 void SigninClientImpl::DelayNetworkCall(const base::Closure& callback) { |
226 // Don't bother if we don't have any kind of network connection. | 227 // Don't bother if we don't have any kind of network connection. |
227 if (net::NetworkChangeNotifier::IsOffline()) { | 228 if (net::NetworkChangeNotifier::IsOffline()) { |
228 delayed_callbacks_.push_back(callback); | 229 delayed_callbacks_.push_back(callback); |
229 } else { | 230 } else { |
230 callback.Run(); | 231 callback.Run(); |
231 } | 232 } |
232 } | 233 } |
233 | 234 |
234 GaiaAuthFetcher* SigninClientImpl::CreateGaiaAuthFetcher( | 235 std::unique_ptr<GaiaAuthFetcher> SigninClientImpl::CreateGaiaAuthFetcher( |
235 GaiaAuthConsumer* consumer, | 236 GaiaAuthConsumer* consumer, |
236 const std::string& source, | 237 const std::string& source, |
237 net::URLRequestContextGetter* getter) { | 238 net::URLRequestContextGetter* getter) { |
238 return new GaiaAuthFetcherIOS(consumer, source, getter, browser_state_); | 239 return base::MakeUnique<GaiaAuthFetcherIOS>(consumer, source, getter, |
| 240 browser_state_); |
239 } | 241 } |
OLD | NEW |