OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/chromeos/settings/device_oauth2_token_service.h" | 5 #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "base/prefs/pref_registry_simple.h" | |
15 #include "base/time/time.h" | 14 #include "base/time/time.h" |
16 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
| 16 #include "components/prefs/pref_registry_simple.h" |
17 #include "google_apis/gaia/google_service_auth_error.h" | 17 #include "google_apis/gaia/google_service_auth_error.h" |
18 | 18 |
19 namespace chromeos { | 19 namespace chromeos { |
20 | 20 |
21 struct DeviceOAuth2TokenService::PendingRequest { | 21 struct DeviceOAuth2TokenService::PendingRequest { |
22 PendingRequest(const base::WeakPtr<RequestImpl>& request, | 22 PendingRequest(const base::WeakPtr<RequestImpl>& request, |
23 const std::string& client_id, | 23 const std::string& client_id, |
24 const std::string& client_secret, | 24 const std::string& client_secret, |
25 const ScopeSet& scopes) | 25 const ScopeSet& scopes) |
26 : request(request), | 26 : request(request), |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 GoogleServiceAuthError auth_error(error); | 135 GoogleServiceAuthError auth_error(error); |
136 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind( | 136 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind( |
137 &RequestImpl::InformConsumer, | 137 &RequestImpl::InformConsumer, |
138 request->AsWeakPtr(), | 138 request->AsWeakPtr(), |
139 auth_error, | 139 auth_error, |
140 std::string(), | 140 std::string(), |
141 base::Time())); | 141 base::Time())); |
142 } | 142 } |
143 | 143 |
144 } // namespace chromeos | 144 } // namespace chromeos |
OLD | NEW |