| 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/supervised_user/supervised_user_service.h" | 5 #include "chrome/browser/supervised_user/supervised_user_service.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "chrome/browser/supervised_user/supervised_user_shared_settings_service
_factory.h" | 28 #include "chrome/browser/supervised_user/supervised_user_shared_settings_service
_factory.h" |
| 29 #include "chrome/browser/supervised_user/supervised_user_site_list.h" | 29 #include "chrome/browser/supervised_user/supervised_user_site_list.h" |
| 30 #include "chrome/browser/supervised_user/supervised_user_sync_service.h" | 30 #include "chrome/browser/supervised_user/supervised_user_sync_service.h" |
| 31 #include "chrome/browser/supervised_user/supervised_user_sync_service_factory.h" | 31 #include "chrome/browser/supervised_user/supervised_user_sync_service_factory.h" |
| 32 #include "chrome/browser/sync/profile_sync_service.h" | 32 #include "chrome/browser/sync/profile_sync_service.h" |
| 33 #include "chrome/browser/sync/profile_sync_service_factory.h" | 33 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 34 #include "chrome/browser/ui/browser.h" | 34 #include "chrome/browser/ui/browser.h" |
| 35 #include "chrome/browser/ui/browser_list.h" | 35 #include "chrome/browser/ui/browser_list.h" |
| 36 #include "chrome/common/chrome_switches.h" | 36 #include "chrome/common/chrome_switches.h" |
| 37 #include "chrome/common/pref_names.h" | 37 #include "chrome/common/pref_names.h" |
| 38 #include "chrome/grit/generated_resources.h" |
| 38 #include "components/pref_registry/pref_registry_syncable.h" | 39 #include "components/pref_registry/pref_registry_syncable.h" |
| 39 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 40 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
| 40 #include "components/signin/core/browser/signin_manager.h" | 41 #include "components/signin/core/browser/signin_manager.h" |
| 41 #include "components/signin/core/browser/signin_manager_base.h" | 42 #include "components/signin/core/browser/signin_manager_base.h" |
| 42 #include "content/public/browser/browser_thread.h" | 43 #include "content/public/browser/browser_thread.h" |
| 43 #include "content/public/browser/user_metrics.h" | 44 #include "content/public/browser/user_metrics.h" |
| 44 #include "google_apis/gaia/google_service_auth_error.h" | 45 #include "google_apis/gaia/google_service_auth_error.h" |
| 45 #include "grit/generated_resources.h" | |
| 46 #include "net/base/escape.h" | 46 #include "net/base/escape.h" |
| 47 #include "ui/base/l10n/l10n_util.h" | 47 #include "ui/base/l10n/l10n_util.h" |
| 48 | 48 |
| 49 #if defined(OS_CHROMEOS) | 49 #if defined(OS_CHROMEOS) |
| 50 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" | 50 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" |
| 51 #include "chrome/browser/chromeos/login/users/user_manager.h" | 51 #include "chrome/browser/chromeos/login/users/user_manager.h" |
| 52 #endif | 52 #endif |
| 53 | 53 |
| 54 #if defined(ENABLE_EXTENSIONS) | 54 #if defined(ENABLE_EXTENSIONS) |
| 55 #include "chrome/browser/extensions/extension_service.h" | 55 #include "chrome/browser/extensions/extension_service.h" |
| (...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 // The active user can be NULL in unit tests. | 819 // The active user can be NULL in unit tests. |
| 820 if (chromeos::UserManager::Get()->GetActiveUser()) { | 820 if (chromeos::UserManager::Get()->GetActiveUser()) { |
| 821 return UTF16ToUTF8(chromeos::UserManager::Get()->GetUserDisplayName( | 821 return UTF16ToUTF8(chromeos::UserManager::Get()->GetUserDisplayName( |
| 822 chromeos::UserManager::Get()->GetActiveUser()->GetUserID())); | 822 chromeos::UserManager::Get()->GetActiveUser()->GetUserID())); |
| 823 } | 823 } |
| 824 return std::string(); | 824 return std::string(); |
| 825 #else | 825 #else |
| 826 return profile_->GetPrefs()->GetString(prefs::kProfileName); | 826 return profile_->GetPrefs()->GetString(prefs::kProfileName); |
| 827 #endif | 827 #endif |
| 828 } | 828 } |
| OLD | NEW |