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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 398753004: [cros] Move User class to user_manager component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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
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/ui/webui/options/browser_options_handler.h" 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "apps/app_window.h" 10 #include "apps/app_window.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 #include "chrome/browser/ui/webui/options/advanced_options_utils.h" 98 #include "chrome/browser/ui/webui/options/advanced_options_utils.h"
99 #endif 99 #endif
100 100
101 #if defined(OS_CHROMEOS) 101 #if defined(OS_CHROMEOS)
102 #include "ash/ash_switches.h" 102 #include "ash/ash_switches.h"
103 #include "ash/desktop_background/user_wallpaper_delegate.h" 103 #include "ash/desktop_background/user_wallpaper_delegate.h"
104 #include "ash/magnifier/magnifier_constants.h" 104 #include "ash/magnifier/magnifier_constants.h"
105 #include "ash/shell.h" 105 #include "ash/shell.h"
106 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 106 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
107 #include "chrome/browser/chromeos/chromeos_utils.h" 107 #include "chrome/browser/chromeos/chromeos_utils.h"
108 #include "chrome/browser/chromeos/login/users/user.h"
109 #include "chrome/browser/chromeos/login/users/user_manager.h" 108 #include "chrome/browser/chromeos/login/users/user_manager.h"
110 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" 109 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
111 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 110 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
112 #include "chrome/browser/chromeos/profiles/profile_helper.h" 111 #include "chrome/browser/chromeos/profiles/profile_helper.h"
113 #include "chrome/browser/chromeos/reset/metrics.h" 112 #include "chrome/browser/chromeos/reset/metrics.h"
114 #include "chrome/browser/chromeos/settings/cros_settings.h" 113 #include "chrome/browser/chromeos/settings/cros_settings.h"
115 #include "chrome/browser/chromeos/system/timezone_util.h" 114 #include "chrome/browser/chromeos/system/timezone_util.h"
116 #include "chrome/browser/policy/profile_policy_connector.h" 115 #include "chrome/browser/policy/profile_policy_connector.h"
117 #include "chrome/browser/policy/profile_policy_connector_factory.h" 116 #include "chrome/browser/policy/profile_policy_connector_factory.h"
118 #include "chrome/browser/ui/browser_window.h" 117 #include "chrome/browser/ui/browser_window.h"
119 #include "chromeos/dbus/dbus_thread_manager.h" 118 #include "chromeos/dbus/dbus_thread_manager.h"
120 #include "chromeos/dbus/power_manager_client.h" 119 #include "chromeos/dbus/power_manager_client.h"
121 #include "components/policy/core/common/policy_map.h" 120 #include "components/policy/core/common/policy_map.h"
122 #include "components/policy/core/common/policy_namespace.h" 121 #include "components/policy/core/common/policy_namespace.h"
123 #include "components/policy/core/common/policy_service.h" 122 #include "components/policy/core/common/policy_service.h"
123 #include "components/user_manager/user.h"
124 #include "policy/policy_constants.h" 124 #include "policy/policy_constants.h"
125 #include "ui/gfx/image/image_skia.h" 125 #include "ui/gfx/image/image_skia.h"
126 #endif // defined(OS_CHROMEOS) 126 #endif // defined(OS_CHROMEOS)
127 127
128 #if defined(OS_WIN) 128 #if defined(OS_WIN)
129 #include "chrome/browser/extensions/settings_api_helpers.h" 129 #include "chrome/browser/extensions/settings_api_helpers.h"
130 #include "chrome/installer/util/auto_launch_util.h" 130 #include "chrome/installer/util/auto_launch_util.h"
131 #include "content/public/browser/browser_url_handler.h" 131 #include "content/public/browser/browser_url_handler.h"
132 #endif // defined(OS_WIN) 132 #endif // defined(OS_WIN)
133 133
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 "defaultSearchGroupLabel", 497 "defaultSearchGroupLabel",
498 l10n_util::GetStringFUTF16(IDS_SEARCH_PREF_EXPLANATION, omnibox_url)); 498 l10n_util::GetStringFUTF16(IDS_SEARCH_PREF_EXPLANATION, omnibox_url));
499 values->SetString("hotwordLearnMoreURL", chrome::kHotwordLearnMoreURL); 499 values->SetString("hotwordLearnMoreURL", chrome::kHotwordLearnMoreURL);
500 RegisterTitle(values, "hotwordConfirmOverlay", 500 RegisterTitle(values, "hotwordConfirmOverlay",
501 IDS_HOTWORD_CONFIRM_BUBBLE_TITLE); 501 IDS_HOTWORD_CONFIRM_BUBBLE_TITLE);
502 502
503 #if defined(OS_CHROMEOS) 503 #if defined(OS_CHROMEOS)
504 Profile* profile = Profile::FromWebUI(web_ui()); 504 Profile* profile = Profile::FromWebUI(web_ui());
505 std::string username = profile->GetProfileName(); 505 std::string username = profile->GetProfileName();
506 if (username.empty()) { 506 if (username.empty()) {
507 chromeos::User* user = 507 user_manager::User* user =
508 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); 508 chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
509 if (user && (user->GetType() != user_manager::USER_TYPE_GUEST)) 509 if (user && (user->GetType() != user_manager::USER_TYPE_GUEST))
510 username = user->email(); 510 username = user->email();
511 511
512 } 512 }
513 if (!username.empty()) 513 if (!username.empty())
514 username = gaia::SanitizeEmail(gaia::CanonicalizeEmail(username)); 514 username = gaia::SanitizeEmail(gaia::CanonicalizeEmail(username));
515 515
516 values->SetString("username", username); 516 values->SetString("username", username);
517 #endif 517 #endif
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1805 extension = extensions::GetExtensionOverridingProxy( 1805 extension = extensions::GetExtensionOverridingProxy(
1806 Profile::FromWebUI(web_ui())); 1806 Profile::FromWebUI(web_ui()));
1807 AppendExtensionData("proxy", extension, &extension_controlled); 1807 AppendExtensionData("proxy", extension, &extension_controlled);
1808 1808
1809 web_ui()->CallJavascriptFunction("BrowserOptions.toggleExtensionIndicators", 1809 web_ui()->CallJavascriptFunction("BrowserOptions.toggleExtensionIndicators",
1810 extension_controlled); 1810 extension_controlled);
1811 #endif // defined(OS_WIN) 1811 #endif // defined(OS_WIN)
1812 } 1812 }
1813 1813
1814 } // namespace options 1814 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698