Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 10384086: Moved url_utils from chrome/browser/net to chrome/common/net. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_operations.cc ('k') | chrome/browser/google/google_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/chromeos/login/existing_user_controller.h" 5 #include "chrome/browser/chromeos/login/existing_user_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 14 matching lines...) Expand all
25 #include "chrome/browser/chromeos/cros/network_library.h" 25 #include "chrome/browser/chromeos/cros/network_library.h"
26 #include "chrome/browser/chromeos/cros_settings.h" 26 #include "chrome/browser/chromeos/cros_settings.h"
27 #include "chrome/browser/chromeos/customization_document.h" 27 #include "chrome/browser/chromeos/customization_document.h"
28 #include "chrome/browser/chromeos/login/helper.h" 28 #include "chrome/browser/chromeos/login/helper.h"
29 #include "chrome/browser/chromeos/login/login_display_host.h" 29 #include "chrome/browser/chromeos/login/login_display_host.h"
30 #include "chrome/browser/chromeos/login/login_utils.h" 30 #include "chrome/browser/chromeos/login/login_utils.h"
31 #include "chrome/browser/chromeos/login/user_manager.h" 31 #include "chrome/browser/chromeos/login/user_manager.h"
32 #include "chrome/browser/chromeos/login/wizard_controller.h" 32 #include "chrome/browser/chromeos/login/wizard_controller.h"
33 #include "chrome/browser/chromeos/system/statistics_provider.h" 33 #include "chrome/browser/chromeos/system/statistics_provider.h"
34 #include "chrome/browser/google/google_util.h" 34 #include "chrome/browser/google/google_util.h"
35 #include "chrome/browser/net/browser_url_util.h"
36 #include "chrome/browser/policy/policy_service.h" 35 #include "chrome/browser/policy/policy_service.h"
37 #include "chrome/browser/prefs/pref_service.h" 36 #include "chrome/browser/prefs/pref_service.h"
38 #include "chrome/browser/prefs/session_startup_pref.h" 37 #include "chrome/browser/prefs/session_startup_pref.h"
39 #include "chrome/browser/profiles/profile_manager.h" 38 #include "chrome/browser/profiles/profile_manager.h"
40 #include "chrome/common/chrome_notification_types.h" 39 #include "chrome/common/chrome_notification_types.h"
41 #include "chrome/common/chrome_switches.h" 40 #include "chrome/common/chrome_switches.h"
42 #include "chrome/common/chrome_version_info.h" 41 #include "chrome/common/chrome_version_info.h"
43 #include "chrome/common/net/gaia/google_service_auth_error.h" 42 #include "chrome/common/net/gaia/google_service_auth_error.h"
43 #include "chrome/common/net/url_util.h"
44 #include "chrome/common/pref_names.h" 44 #include "chrome/common/pref_names.h"
45 #include "chrome/common/url_constants.h" 45 #include "chrome/common/url_constants.h"
46 #include "chromeos/dbus/dbus_thread_manager.h" 46 #include "chromeos/dbus/dbus_thread_manager.h"
47 #include "chromeos/dbus/session_manager_client.h" 47 #include "chromeos/dbus/session_manager_client.h"
48 #include "content/public/browser/browser_thread.h" 48 #include "content/public/browser/browser_thread.h"
49 #include "content/public/browser/notification_service.h" 49 #include "content/public/browser/notification_service.h"
50 #include "content/public/browser/notification_types.h" 50 #include "content/public/browser/notification_types.h"
51 #include "grit/generated_resources.h" 51 #include "grit/generated_resources.h"
52 #include "net/http/http_auth_cache.h" 52 #include "net/http/http_auth_cache.h"
53 #include "net/http/http_network_session.h" 53 #include "net/http/http_network_session.h"
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 #if defined(NEW_GSG_URL) 755 #if defined(NEW_GSG_URL)
756 std::string ExistingUserController::GetGettingStartedGuideURL() const { 756 std::string ExistingUserController::GetGettingStartedGuideURL() const {
757 GURL guide_url(kGetStartedURLPattern); 757 GURL guide_url(kGetStartedURLPattern);
758 std::string board; 758 std::string board;
759 const char kMachineInfoBoard[] = "CHROMEOS_RELEASE_BOARD"; 759 const char kMachineInfoBoard[] = "CHROMEOS_RELEASE_BOARD";
760 system::StatisticsProvider* provider = 760 system::StatisticsProvider* provider =
761 system::StatisticsProvider::GetInstance(); 761 system::StatisticsProvider::GetInstance();
762 if (!provider->GetMachineStatistic(kMachineInfoBoard, &board)) 762 if (!provider->GetMachineStatistic(kMachineInfoBoard, &board))
763 LOG(ERROR) << "Failed to get board information"; 763 LOG(ERROR) << "Failed to get board information";
764 if (!board.empty()) { 764 if (!board.empty()) {
765 guide_url = chrome_browser_net::AppendQueryParameter(guide_url, 765 guide_url = chrome_common_net::AppendQueryParameter(guide_url,
766 kGetStartedBoardParam, 766 kGetStartedBoardParam,
767 board); 767 board);
768 } 768 }
769 if (is_owner_login_) { 769 if (is_owner_login_) {
770 guide_url = chrome_browser_net::AppendQueryParameter( 770 guide_url = chrome_common_net::AppendQueryParameter(
771 guide_url, 771 guide_url,
772 kGetStartedOwnerParam, 772 kGetStartedOwnerParam,
773 kGetStartedOwnerParamValue); 773 kGetStartedOwnerParamValue);
774 } 774 }
775 guide_url = google_util::AppendGoogleLocaleParam(guide_url); 775 guide_url = google_util::AppendGoogleLocaleParam(guide_url);
776 guide_url = chrome_browser_net::AppendQueryParameter( 776 guide_url = chrome_common_net::AppendQueryParameter(
777 guide_url, 777 guide_url,
778 kGetStartedInitialLocaleParam, 778 kGetStartedInitialLocaleParam,
779 WizardController::GetInitialLocale()); 779 WizardController::GetInitialLocale());
780 return guide_url.spec(); 780 return guide_url.spec();
781 } 781 }
782 #else 782 #else
783 std::string ExistingUserController::GetGettingStartedGuideURL() const { 783 std::string ExistingUserController::GetGettingStartedGuideURL() const {
784 const char* url = kGetStartedURLPattern; 784 const char* url = kGetStartedURLPattern;
785 PrefService* prefs = g_browser_process->local_state(); 785 PrefService* prefs = g_browser_process->local_state();
786 const std::string current_locale = 786 const std::string current_locale =
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 // Invalidate OAuth token, since it can't be correct after password is 866 // Invalidate OAuth token, since it can't be correct after password is
867 // changed. 867 // changed.
868 UserManager::Get()->SaveUserOAuthStatus(username, 868 UserManager::Get()->SaveUserOAuthStatus(username,
869 User::OAUTH_TOKEN_STATUS_INVALID); 869 User::OAUTH_TOKEN_STATUS_INVALID);
870 870
871 login_display_->SetUIEnabled(true); 871 login_display_->SetUIEnabled(true);
872 login_display_->ShowGaiaPasswordChanged(username); 872 login_display_->ShowGaiaPasswordChanged(username);
873 } 873 }
874 874
875 } // namespace chromeos 875 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_operations.cc ('k') | chrome/browser/google/google_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698