OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/views/profiles/profile_chooser_view.h" | 5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/prefs/pref_service.h" | |
9 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/lifetime/application_lifetime.h" | 10 #include "chrome/browser/lifetime/application_lifetime.h" |
12 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 11 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
13 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 12 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
14 #include "chrome/browser/profiles/profile_info_cache.h" | 13 #include "chrome/browser/profiles/profile_info_cache.h" |
15 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
16 #include "chrome/browser/profiles/profile_metrics.h" | 15 #include "chrome/browser/profiles/profile_metrics.h" |
17 #include "chrome/browser/profiles/profile_window.h" | 16 #include "chrome/browser/profiles/profile_window.h" |
18 #include "chrome/browser/profiles/profiles_state.h" | 17 #include "chrome/browser/profiles/profiles_state.h" |
(...skipping 10 matching lines...) Expand all Loading... |
29 #include "chrome/browser/ui/singleton_tabs.h" | 28 #include "chrome/browser/ui/singleton_tabs.h" |
30 #include "chrome/browser/ui/user_manager.h" | 29 #include "chrome/browser/ui/user_manager.h" |
31 #include "chrome/browser/ui/views/profiles/signin_view_controller.h" | 30 #include "chrome/browser/ui/views/profiles/signin_view_controller.h" |
32 #include "chrome/browser/ui/views/profiles/user_manager_view.h" | 31 #include "chrome/browser/ui/views/profiles/user_manager_view.h" |
33 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 32 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
34 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 33 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
35 #include "chrome/common/pref_names.h" | 34 #include "chrome/common/pref_names.h" |
36 #include "chrome/common/url_constants.h" | 35 #include "chrome/common/url_constants.h" |
37 #include "chrome/grit/chromium_strings.h" | 36 #include "chrome/grit/chromium_strings.h" |
38 #include "chrome/grit/generated_resources.h" | 37 #include "chrome/grit/generated_resources.h" |
| 38 #include "components/prefs/pref_service.h" |
39 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 39 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
40 #include "components/signin/core/browser/signin_error_controller.h" | 40 #include "components/signin/core/browser/signin_error_controller.h" |
41 #include "components/signin/core/browser/signin_header_helper.h" | 41 #include "components/signin/core/browser/signin_header_helper.h" |
42 #include "components/signin/core/browser/signin_manager.h" | 42 #include "components/signin/core/browser/signin_manager.h" |
43 #include "components/signin/core/common/profile_management_switches.h" | 43 #include "components/signin/core/common/profile_management_switches.h" |
44 #include "content/public/browser/render_widget_host_view.h" | 44 #include "content/public/browser/render_widget_host_view.h" |
45 #include "grit/theme_resources.h" | 45 #include "grit/theme_resources.h" |
46 #include "third_party/skia/include/core/SkColor.h" | 46 #include "third_party/skia/include/core/SkColor.h" |
47 #include "ui/base/l10n/l10n_util.h" | 47 #include "ui/base/l10n/l10n_util.h" |
48 #include "ui/base/resource/resource_bundle.h" | 48 #include "ui/base/resource/resource_bundle.h" |
(...skipping 1824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1873 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 1873 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
1874 IncognitoModePrefs::DISABLED; | 1874 IncognitoModePrefs::DISABLED; |
1875 return incognito_available && !browser_->profile()->IsGuestSession(); | 1875 return incognito_available && !browser_->profile()->IsGuestSession(); |
1876 } | 1876 } |
1877 | 1877 |
1878 void ProfileChooserView::PostActionPerformed( | 1878 void ProfileChooserView::PostActionPerformed( |
1879 ProfileMetrics::ProfileDesktopMenu action_performed) { | 1879 ProfileMetrics::ProfileDesktopMenu action_performed) { |
1880 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); | 1880 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); |
1881 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; | 1881 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; |
1882 } | 1882 } |
OLD | NEW |