| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/signin/user_manager_screen_handler.h" | 5 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 base::FilePath path = | 133 base::FilePath path = |
| 134 profiles::GetPathOfProfileWithEmail(g_browser_process->profile_manager(), | 134 profiles::GetPathOfProfileWithEmail(g_browser_process->profile_manager(), |
| 135 email); | 135 email); |
| 136 Profile* profile = g_browser_process->profile_manager() | 136 Profile* profile = g_browser_process->profile_manager() |
| 137 ->GetProfileByPath(path); | 137 ->GetProfileByPath(path); |
| 138 return extensions::ScreenlockPrivateEventRouter::GetFactoryInstance()->Get( | 138 return extensions::ScreenlockPrivateEventRouter::GetFactoryInstance()->Get( |
| 139 profile); | 139 profile); |
| 140 } | 140 } |
| 141 | 141 |
| 142 bool IsGuestModeEnabled() { | 142 bool IsGuestModeEnabled() { |
| 143 if (switches::IsMaterialDesignUserManager()) | |
| 144 return true; | |
| 145 PrefService* service = g_browser_process->local_state(); | 143 PrefService* service = g_browser_process->local_state(); |
| 146 DCHECK(service); | 144 DCHECK(service); |
| 147 return service->GetBoolean(prefs::kBrowserGuestModeEnabled); | 145 return service->GetBoolean(prefs::kBrowserGuestModeEnabled); |
| 148 } | 146 } |
| 149 | 147 |
| 150 bool IsAddPersonEnabled() { | 148 bool IsAddPersonEnabled() { |
| 151 if (switches::IsMaterialDesignUserManager()) | |
| 152 return true; | |
| 153 PrefService* service = g_browser_process->local_state(); | 149 PrefService* service = g_browser_process->local_state(); |
| 154 DCHECK(service); | 150 DCHECK(service); |
| 155 return service->GetBoolean(prefs::kBrowserAddPersonEnabled); | 151 return service->GetBoolean(prefs::kBrowserAddPersonEnabled); |
| 156 } | 152 } |
| 157 | 153 |
| 158 // Executes the action specified by the URL's Hash parameter, if any. Deletes | 154 // Executes the action specified by the URL's Hash parameter, if any. Deletes |
| 159 // itself after the action would be performed. | 155 // itself after the action would be performed. |
| 160 class UrlHashHelper : public chrome::BrowserListObserver { | 156 class UrlHashHelper : public chrome::BrowserListObserver { |
| 161 public: | 157 public: |
| 162 UrlHashHelper(Browser* browser, const std::string& hash); | 158 UrlHashHelper(Browser* browser, const std::string& hash); |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 Profile* profile, Profile::CreateStatus profile_create_status) { | 1015 Profile* profile, Profile::CreateStatus profile_create_status) { |
| 1020 Browser* browser = chrome::FindAnyBrowser(profile, false); | 1016 Browser* browser = chrome::FindAnyBrowser(profile, false); |
| 1021 if (browser && browser->window()) { | 1017 if (browser && browser->window()) { |
| 1022 OnBrowserWindowReady(browser); | 1018 OnBrowserWindowReady(browser); |
| 1023 } else { | 1019 } else { |
| 1024 registrar_.Add(this, | 1020 registrar_.Add(this, |
| 1025 chrome::NOTIFICATION_BROWSER_WINDOW_READY, | 1021 chrome::NOTIFICATION_BROWSER_WINDOW_READY, |
| 1026 content::NotificationService::AllSources()); | 1022 content::NotificationService::AllSources()); |
| 1027 } | 1023 } |
| 1028 } | 1024 } |
| OLD | NEW |