OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/webui/sync_setup_handler2.h" | 5 #include "chrome/browser/ui/webui/sync_setup_handler2.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chrome/browser/google/google_util.h" | 14 #include "chrome/browser/google/google_util.h" |
15 #include "chrome/browser/prefs/pref_service.h" | 15 #include "chrome/browser/prefs/pref_service.h" |
16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/profiles/profile_info_cache.h" | 17 #include "chrome/browser/profiles/profile_info_cache.h" |
18 #include "chrome/browser/profiles/profile_manager.h" | 18 #include "chrome/browser/profiles/profile_manager.h" |
19 #include "chrome/browser/profiles/profile_metrics.h" | 19 #include "chrome/browser/profiles/profile_metrics.h" |
20 #include "chrome/browser/sync/profile_sync_service.h" | 20 #include "chrome/browser/sync/profile_sync_service.h" |
21 #include "chrome/browser/sync/protocol/service_constants.h" | 21 #include "chrome/browser/sync/protocol/service_constants.h" |
22 #include "chrome/browser/sync/signin_manager.h" | 22 #include "chrome/browser/sync/signin_manager.h" |
23 #include "chrome/browser/sync/syncable/model_type.h" | 23 #include "chrome/browser/sync/syncable/model_type.h" |
24 #include "chrome/browser/sync/sync_setup_flow.h" | 24 #include "chrome/browser/sync/sync_setup_flow.h" |
25 #include "chrome/browser/sync/util/oauth.h" | 25 #include "chrome/browser/sync/util/oauth.h" |
26 #include "chrome/browser/ui/browser_list.h" | 26 #include "chrome/browser/ui/browser_list.h" |
27 #include "chrome/browser/ui/webui/sync_promo_trial.h" | 27 #include "chrome/browser/ui/webui/sync_promo/sync_promo_trial.h" |
28 #include "chrome/browser/ui/webui/sync_promo_ui.h" | 28 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" |
29 #include "chrome/browser/ui/webui/user_selectable_sync_type.h" | 29 #include "chrome/browser/ui/webui/user_selectable_sync_type.h" |
30 #include "chrome/common/net/gaia/gaia_constants.h" | 30 #include "chrome/common/net/gaia/gaia_constants.h" |
31 #include "chrome/common/pref_names.h" | 31 #include "chrome/common/pref_names.h" |
32 #include "chrome/common/url_constants.h" | 32 #include "chrome/common/url_constants.h" |
33 #include "content/browser/tab_contents/tab_contents.h" | 33 #include "content/browser/tab_contents/tab_contents.h" |
34 #include "grit/chromium_strings.h" | 34 #include "grit/chromium_strings.h" |
35 #include "grit/generated_resources.h" | 35 #include "grit/generated_resources.h" |
36 #include "grit/locale_settings.h" | 36 #include "grit/locale_settings.h" |
37 #include "ui/base/l10n/l10n_util.h" | 37 #include "ui/base/l10n/l10n_util.h" |
38 | 38 |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 } | 763 } |
764 | 764 |
765 void SyncSetupHandler2::ShowLoginErrorMessage(const string16& error_message) { | 765 void SyncSetupHandler2::ShowLoginErrorMessage(const string16& error_message) { |
766 DictionaryValue args; | 766 DictionaryValue args; |
767 Profile* profile = Profile::FromWebUI(web_ui_); | 767 Profile* profile = Profile::FromWebUI(web_ui_); |
768 ProfileSyncService* service = profile->GetProfileSyncService(); | 768 ProfileSyncService* service = profile->GetProfileSyncService(); |
769 SyncSetupFlow::GetArgsForGaiaLogin(service, &args); | 769 SyncSetupFlow::GetArgsForGaiaLogin(service, &args); |
770 args.SetString("error_message", error_message); | 770 args.SetString("error_message", error_message); |
771 ShowGaiaLogin(args); | 771 ShowGaiaLogin(args); |
772 } | 772 } |
OLD | NEW |