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/managed_mode/managed_user_registration_utility.h" | 5 #include "chrome/browser/managed_mode/managed_user_registration_utility.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/sync/glue/device_info.h" | 22 #include "chrome/browser/sync/glue/device_info.h" |
23 #include "chrome/common/chrome_switches.h" | 23 #include "chrome/common/chrome_switches.h" |
24 #include "chrome/common/pref_names.h" | 24 #include "chrome/common/pref_names.h" |
25 #include "google_apis/gaia/gaia_urls.h" | 25 #include "google_apis/gaia/gaia_urls.h" |
26 #include "google_apis/gaia/google_service_auth_error.h" | 26 #include "google_apis/gaia/google_service_auth_error.h" |
27 | 27 |
28 using base::DictionaryValue; | 28 using base::DictionaryValue; |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 const char kAcknowledged[] = "acknowledged"; | |
33 const char kName[] = "name"; | |
34 const char kMasterKey[] = "masterKey"; | |
35 | |
36 ManagedUserRegistrationUtility* g_instance_for_tests = NULL; | 32 ManagedUserRegistrationUtility* g_instance_for_tests = NULL; |
37 | 33 |
38 // Actual implementation of ManagedUserRegistrationUtility. | 34 // Actual implementation of ManagedUserRegistrationUtility. |
39 class ManagedUserRegistrationUtilityImpl | 35 class ManagedUserRegistrationUtilityImpl |
40 : public ManagedUserRegistrationUtility, | 36 : public ManagedUserRegistrationUtility, |
41 public ManagedUserSyncServiceObserver { | 37 public ManagedUserSyncServiceObserver { |
42 public: | 38 public: |
43 ManagedUserRegistrationUtilityImpl( | 39 ManagedUserRegistrationUtilityImpl( |
44 PrefService* prefs, | 40 PrefService* prefs, |
45 scoped_ptr<ManagedUserRefreshTokenFetcher> token_fetcher, | 41 scoped_ptr<ManagedUserRefreshTokenFetcher> token_fetcher, |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 pending_managed_user_id_); | 307 pending_managed_user_id_); |
312 } | 308 } |
313 } | 309 } |
314 | 310 |
315 if (run_callback) | 311 if (run_callback) |
316 callback_.Run(error, pending_managed_user_token_); | 312 callback_.Run(error, pending_managed_user_token_); |
317 callback_.Reset(); | 313 callback_.Reset(); |
318 } | 314 } |
319 | 315 |
320 } // namespace | 316 } // namespace |
OLD | NEW |