OLD | NEW |
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/login_utils.h" | 5 #include "chrome/browser/chromeos/login/login_utils.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
| 11 #include "base/base_paths.h" |
11 #include "base/bind.h" | 12 #include "base/bind.h" |
12 #include "base/command_line.h" | 13 #include "base/command_line.h" |
13 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
14 #include "base/file_util.h" | 15 #include "base/file_util.h" |
15 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
16 #include "base/location.h" | 17 #include "base/location.h" |
17 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
18 #include "base/memory/scoped_ptr.h" | 19 #include "base/memory/scoped_ptr.h" |
19 #include "base/memory/singleton.h" | 20 #include "base/memory/singleton.h" |
20 #include "base/memory/weak_ptr.h" | 21 #include "base/memory/weak_ptr.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 #include "chrome/browser/lifetime/application_lifetime.h" | 60 #include "chrome/browser/lifetime/application_lifetime.h" |
60 #include "chrome/browser/pref_service_flags_storage.h" | 61 #include "chrome/browser/pref_service_flags_storage.h" |
61 #include "chrome/browser/profiles/profile.h" | 62 #include "chrome/browser/profiles/profile.h" |
62 #include "chrome/browser/profiles/profile_manager.h" | 63 #include "chrome/browser/profiles/profile_manager.h" |
63 #include "chrome/browser/rlz/rlz.h" | 64 #include "chrome/browser/rlz/rlz.h" |
64 #include "chrome/browser/signin/signin_manager_factory.h" | 65 #include "chrome/browser/signin/signin_manager_factory.h" |
65 #include "chrome/browser/sync/profile_sync_service.h" | 66 #include "chrome/browser/sync/profile_sync_service.h" |
66 #include "chrome/browser/sync/profile_sync_service_factory.h" | 67 #include "chrome/browser/sync/profile_sync_service_factory.h" |
67 #include "chrome/browser/ui/app_list/start_page_service.h" | 68 #include "chrome/browser/ui/app_list/start_page_service.h" |
68 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 69 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
69 #include "chrome/common/chrome_paths.h" | |
70 #include "chrome/common/chrome_switches.h" | 70 #include "chrome/common/chrome_switches.h" |
71 #include "chrome/common/logging_chrome.h" | 71 #include "chrome/common/logging_chrome.h" |
72 #include "chrome/common/pref_names.h" | 72 #include "chrome/common/pref_names.h" |
73 #include "chromeos/chromeos_switches.h" | 73 #include "chromeos/chromeos_switches.h" |
74 #include "chromeos/cryptohome/cryptohome_util.h" | 74 #include "chromeos/cryptohome/cryptohome_util.h" |
75 #include "chromeos/dbus/cryptohome_client.h" | 75 #include "chromeos/dbus/cryptohome_client.h" |
76 #include "chromeos/dbus/dbus_method_call_status.h" | 76 #include "chromeos/dbus/dbus_method_call_status.h" |
77 #include "chromeos/dbus/dbus_thread_manager.h" | 77 #include "chromeos/dbus/dbus_thread_manager.h" |
78 #include "chromeos/dbus/session_manager_client.h" | 78 #include "chromeos/dbus/session_manager_client.h" |
79 #include "chromeos/ime/input_method_manager.h" | 79 #include "chromeos/ime/input_method_manager.h" |
(...skipping 12 matching lines...) Expand all Loading... |
92 namespace chromeos { | 92 namespace chromeos { |
93 | 93 |
94 namespace { | 94 namespace { |
95 | 95 |
96 #if defined(ENABLE_RLZ) | 96 #if defined(ENABLE_RLZ) |
97 // Flag file that disables RLZ tracking, when present. | 97 // Flag file that disables RLZ tracking, when present. |
98 const base::FilePath::CharType kRLZDisabledFlagName[] = | 98 const base::FilePath::CharType kRLZDisabledFlagName[] = |
99 FILE_PATH_LITERAL(".rlz_disabled"); | 99 FILE_PATH_LITERAL(".rlz_disabled"); |
100 | 100 |
101 base::FilePath GetRlzDisabledFlagPath() { | 101 base::FilePath GetRlzDisabledFlagPath() { |
102 return base::GetHomeDir().Append(kRLZDisabledFlagName); | 102 base::FilePath homedir; |
| 103 PathService::Get(base::DIR_HOME, &homedir); |
| 104 return homedir.Append(kRLZDisabledFlagName); |
103 } | 105 } |
104 #endif | 106 #endif |
105 | 107 |
106 } // namespace | 108 } // namespace |
107 | 109 |
108 struct DoBrowserLaunchOnLocaleLoadedData; | 110 struct DoBrowserLaunchOnLocaleLoadedData; |
109 | 111 |
110 class LoginUtilsImpl | 112 class LoginUtilsImpl |
111 : public LoginUtils, | 113 : public LoginUtils, |
112 public OAuth2LoginManager::Observer, | 114 public OAuth2LoginManager::Observer, |
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
951 CrosSettings* cros_settings = CrosSettings::Get(); | 953 CrosSettings* cros_settings = CrosSettings::Get(); |
952 bool allow_new_user = false; | 954 bool allow_new_user = false; |
953 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); | 955 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); |
954 if (allow_new_user) | 956 if (allow_new_user) |
955 return true; | 957 return true; |
956 return cros_settings->FindEmailInList( | 958 return cros_settings->FindEmailInList( |
957 kAccountsPrefUsers, username, wildcard_match); | 959 kAccountsPrefUsers, username, wildcard_match); |
958 } | 960 } |
959 | 961 |
960 } // namespace chromeos | 962 } // namespace chromeos |
OLD | NEW |