OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/sync/one_click_signin_helper.h" | 5 #include "chrome/browser/ui/sync/one_click_signin_helper.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h" | 52 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h" |
53 #include "chrome/browser/ui/sync/signin_histogram.h" | 53 #include "chrome/browser/ui/sync/signin_histogram.h" |
54 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" | 54 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" |
55 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" | 55 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" |
56 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 56 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
57 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 57 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
58 #include "chrome/common/chrome_version_info.h" | 58 #include "chrome/common/chrome_version_info.h" |
59 #include "chrome/common/net/url_util.h" | 59 #include "chrome/common/net/url_util.h" |
60 #include "chrome/common/pref_names.h" | 60 #include "chrome/common/pref_names.h" |
61 #include "chrome/common/url_constants.h" | 61 #include "chrome/common/url_constants.h" |
| 62 #include "chrome/grit/chromium_strings.h" |
| 63 #include "chrome/grit/generated_resources.h" |
62 #include "components/autofill/core/common/password_form.h" | 64 #include "components/autofill/core/common/password_form.h" |
63 #include "components/google/core/browser/google_util.h" | 65 #include "components/google/core/browser/google_util.h" |
64 #include "components/password_manager/core/browser/password_manager.h" | 66 #include "components/password_manager/core/browser/password_manager.h" |
65 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 67 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
66 #include "components/signin/core/browser/signin_client.h" | 68 #include "components/signin/core/browser/signin_client.h" |
67 #include "components/signin/core/browser/signin_error_controller.h" | 69 #include "components/signin/core/browser/signin_error_controller.h" |
68 #include "components/signin/core/browser/signin_manager.h" | 70 #include "components/signin/core/browser/signin_manager.h" |
69 #include "components/signin/core/browser/signin_manager_cookie_helper.h" | 71 #include "components/signin/core/browser/signin_manager_cookie_helper.h" |
70 #include "components/signin/core/common/profile_management_switches.h" | 72 #include "components/signin/core/common/profile_management_switches.h" |
71 #include "components/sync_driver/sync_prefs.h" | 73 #include "components/sync_driver/sync_prefs.h" |
72 #include "content/public/browser/browser_thread.h" | 74 #include "content/public/browser/browser_thread.h" |
73 #include "content/public/browser/navigation_entry.h" | 75 #include "content/public/browser/navigation_entry.h" |
74 #include "content/public/browser/page_navigator.h" | 76 #include "content/public/browser/page_navigator.h" |
75 #include "content/public/browser/render_frame_host.h" | 77 #include "content/public/browser/render_frame_host.h" |
76 #include "content/public/browser/render_process_host.h" | 78 #include "content/public/browser/render_process_host.h" |
77 #include "content/public/browser/web_contents.h" | 79 #include "content/public/browser/web_contents.h" |
78 #include "content/public/browser/web_contents_delegate.h" | 80 #include "content/public/browser/web_contents_delegate.h" |
79 #include "content/public/common/frame_navigate_params.h" | 81 #include "content/public/common/frame_navigate_params.h" |
80 #include "content/public/common/page_transition_types.h" | 82 #include "content/public/common/page_transition_types.h" |
81 #include "google_apis/gaia/gaia_auth_util.h" | 83 #include "google_apis/gaia/gaia_auth_util.h" |
82 #include "google_apis/gaia/gaia_urls.h" | 84 #include "google_apis/gaia/gaia_urls.h" |
83 #include "grit/chromium_strings.h" | |
84 #include "grit/generated_resources.h" | |
85 #include "grit/theme_resources.h" | 85 #include "grit/theme_resources.h" |
86 #include "ipc/ipc_message_macros.h" | 86 #include "ipc/ipc_message_macros.h" |
87 #include "net/base/url_util.h" | 87 #include "net/base/url_util.h" |
88 #include "net/cookies/cookie_monster.h" | 88 #include "net/cookies/cookie_monster.h" |
89 #include "net/url_request/url_request.h" | 89 #include "net/url_request/url_request.h" |
90 #include "ui/base/l10n/l10n_util.h" | 90 #include "ui/base/l10n/l10n_util.h" |
91 #include "url/gurl.h" | 91 #include "url/gurl.h" |
92 | 92 |
93 | 93 |
94 namespace { | 94 namespace { |
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1597 // If the web contents is showing a blank page and not about to be closed, | 1597 // If the web contents is showing a blank page and not about to be closed, |
1598 // redirect to the NTP or apps page. | 1598 // redirect to the NTP or apps page. |
1599 if (signin::IsContinueUrlForWebBasedSigninFlow(current_url) && | 1599 if (signin::IsContinueUrlForWebBasedSigninFlow(current_url) && |
1600 !signin::IsAutoCloseEnabledInURL(original_continue_url_)) { | 1600 !signin::IsAutoCloseEnabledInURL(original_continue_url_)) { |
1601 RedirectToNtpOrAppsPage( | 1601 RedirectToNtpOrAppsPage( |
1602 web_contents(), | 1602 web_contents(), |
1603 signin::GetSourceForPromoURL(original_continue_url_)); | 1603 signin::GetSourceForPromoURL(original_continue_url_)); |
1604 } | 1604 } |
1605 } | 1605 } |
1606 } | 1606 } |
OLD | NEW |