| 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/webui/chromeos/login/enrollment_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
| 17 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 17 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
| 18 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 18 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
| 19 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 19 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
| 20 #include "chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h" | 20 #include "chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h" |
| 21 #include "chrome/browser/profiles/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
| 22 #include "chrome/browser/ui/webui/chromeos/login/authenticated_user_email_retrie
ver.h" | 22 #include "chrome/browser/ui/webui/chromeos/login/authenticated_user_email_retrie
ver.h" |
| 23 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 23 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 24 #include "chrome/grit/generated_resources.h" |
| 24 #include "chromeos/network/network_state.h" | 25 #include "chromeos/network/network_state.h" |
| 25 #include "chromeos/network/network_state_handler.h" | 26 #include "chromeos/network/network_state_handler.h" |
| 26 #include "components/policy/core/browser/cloud/message_util.h" | 27 #include "components/policy/core/browser/cloud/message_util.h" |
| 27 #include "content/public/browser/web_contents.h" | 28 #include "content/public/browser/web_contents.h" |
| 28 #include "google_apis/gaia/gaia_auth_fetcher.h" | 29 #include "google_apis/gaia/gaia_auth_fetcher.h" |
| 29 #include "google_apis/gaia/gaia_auth_util.h" | 30 #include "google_apis/gaia/gaia_auth_util.h" |
| 30 #include "google_apis/gaia/gaia_constants.h" | 31 #include "google_apis/gaia/gaia_constants.h" |
| 31 #include "google_apis/gaia/gaia_urls.h" | 32 #include "google_apis/gaia/gaia_urls.h" |
| 32 #include "google_apis/gaia/google_service_auth_error.h" | 33 #include "google_apis/gaia/google_service_auth_error.h" |
| 33 #include "grit/generated_resources.h" | |
| 34 #include "net/url_request/url_request_context_getter.h" | 34 #include "net/url_request/url_request_context_getter.h" |
| 35 #include "ui/base/l10n/l10n_util.h" | 35 #include "ui/base/l10n/l10n_util.h" |
| 36 | 36 |
| 37 namespace chromeos { | 37 namespace chromeos { |
| 38 namespace { | 38 namespace { |
| 39 | 39 |
| 40 const char kJsScreenPath[] = "login.OAuthEnrollmentScreen"; | 40 const char kJsScreenPath[] = "login.OAuthEnrollmentScreen"; |
| 41 | 41 |
| 42 // Start page of GAIA authentication extension. | 42 // Start page of GAIA authentication extension. |
| 43 const char kGaiaExtStartPage[] = | 43 const char kGaiaExtStartPage[] = |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 screen_data.SetString("signin_url", kGaiaExtStartPage); | 593 screen_data.SetString("signin_url", kGaiaExtStartPage); |
| 594 screen_data.SetString("gaiaUrl", GaiaUrls::GetInstance()->gaia_url().spec()); | 594 screen_data.SetString("gaiaUrl", GaiaUrls::GetInstance()->gaia_url().spec()); |
| 595 screen_data.SetString("enrollment_mode", | 595 screen_data.SetString("enrollment_mode", |
| 596 EnrollmentModeToString(enrollment_mode_)); | 596 EnrollmentModeToString(enrollment_mode_)); |
| 597 screen_data.SetString("management_domain", management_domain_); | 597 screen_data.SetString("management_domain", management_domain_); |
| 598 | 598 |
| 599 ShowScreen(OobeUI::kScreenOobeEnrollment, &screen_data); | 599 ShowScreen(OobeUI::kScreenOobeEnrollment, &screen_data); |
| 600 } | 600 } |
| 601 | 601 |
| 602 } // namespace chromeos | 602 } // namespace chromeos |
| OLD | NEW |