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

Side by Side Diff: trunk/src/chrome/browser/chromeos/login/login_utils.cc

Issue 284333002: Revert 270872 "Move all callers of GetHomeDir() to PathService::..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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/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"
12 #include "base/bind.h" 11 #include "base/bind.h"
13 #include "base/command_line.h" 12 #include "base/command_line.h"
14 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
15 #include "base/file_util.h" 14 #include "base/file_util.h"
16 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
17 #include "base/location.h" 16 #include "base/location.h"
18 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
19 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
20 #include "base/memory/singleton.h" 19 #include "base/memory/singleton.h"
21 #include "base/memory/weak_ptr.h" 20 #include "base/memory/weak_ptr.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 #include "chrome/browser/lifetime/application_lifetime.h" 58 #include "chrome/browser/lifetime/application_lifetime.h"
60 #include "chrome/browser/pref_service_flags_storage.h" 59 #include "chrome/browser/pref_service_flags_storage.h"
61 #include "chrome/browser/profiles/profile.h" 60 #include "chrome/browser/profiles/profile.h"
62 #include "chrome/browser/profiles/profile_manager.h" 61 #include "chrome/browser/profiles/profile_manager.h"
63 #include "chrome/browser/rlz/rlz.h" 62 #include "chrome/browser/rlz/rlz.h"
64 #include "chrome/browser/signin/signin_manager_factory.h" 63 #include "chrome/browser/signin/signin_manager_factory.h"
65 #include "chrome/browser/sync/profile_sync_service.h" 64 #include "chrome/browser/sync/profile_sync_service.h"
66 #include "chrome/browser/sync/profile_sync_service_factory.h" 65 #include "chrome/browser/sync/profile_sync_service_factory.h"
67 #include "chrome/browser/ui/app_list/start_page_service.h" 66 #include "chrome/browser/ui/app_list/start_page_service.h"
68 #include "chrome/browser/ui/startup/startup_browser_creator.h" 67 #include "chrome/browser/ui/startup/startup_browser_creator.h"
68 #include "chrome/common/chrome_paths.h"
69 #include "chrome/common/chrome_switches.h" 69 #include "chrome/common/chrome_switches.h"
70 #include "chrome/common/logging_chrome.h" 70 #include "chrome/common/logging_chrome.h"
71 #include "chrome/common/pref_names.h" 71 #include "chrome/common/pref_names.h"
72 #include "chromeos/chromeos_switches.h" 72 #include "chromeos/chromeos_switches.h"
73 #include "chromeos/cryptohome/cryptohome_util.h" 73 #include "chromeos/cryptohome/cryptohome_util.h"
74 #include "chromeos/dbus/cryptohome_client.h" 74 #include "chromeos/dbus/cryptohome_client.h"
75 #include "chromeos/dbus/dbus_method_call_status.h" 75 #include "chromeos/dbus/dbus_method_call_status.h"
76 #include "chromeos/dbus/dbus_thread_manager.h" 76 #include "chromeos/dbus/dbus_thread_manager.h"
77 #include "chromeos/dbus/session_manager_client.h" 77 #include "chromeos/dbus/session_manager_client.h"
78 #include "chromeos/ime/input_method_manager.h" 78 #include "chromeos/ime/input_method_manager.h"
(...skipping 12 matching lines...) Expand all
91 namespace chromeos { 91 namespace chromeos {
92 92
93 namespace { 93 namespace {
94 94
95 #if defined(ENABLE_RLZ) 95 #if defined(ENABLE_RLZ)
96 // Flag file that disables RLZ tracking, when present. 96 // Flag file that disables RLZ tracking, when present.
97 const base::FilePath::CharType kRLZDisabledFlagName[] = 97 const base::FilePath::CharType kRLZDisabledFlagName[] =
98 FILE_PATH_LITERAL(".rlz_disabled"); 98 FILE_PATH_LITERAL(".rlz_disabled");
99 99
100 base::FilePath GetRlzDisabledFlagPath() { 100 base::FilePath GetRlzDisabledFlagPath() {
101 base::FilePath homedir; 101 return base::GetHomeDir().Append(kRLZDisabledFlagName);
102 PathService::Get(base::DIR_HOME, &homedir);
103 return homedir.Append(kRLZDisabledFlagName);
104 } 102 }
105 #endif 103 #endif
106 104
107 } // namespace 105 } // namespace
108 106
109 struct DoBrowserLaunchOnLocaleLoadedData; 107 struct DoBrowserLaunchOnLocaleLoadedData;
110 108
111 class LoginUtilsImpl 109 class LoginUtilsImpl
112 : public LoginUtils, 110 : public LoginUtils,
113 public OAuth2LoginManager::Observer, 111 public OAuth2LoginManager::Observer,
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 CrosSettings* cros_settings = CrosSettings::Get(); 950 CrosSettings* cros_settings = CrosSettings::Get();
953 bool allow_new_user = false; 951 bool allow_new_user = false;
954 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); 952 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
955 if (allow_new_user) 953 if (allow_new_user)
956 return true; 954 return true;
957 return cros_settings->FindEmailInList( 955 return cros_settings->FindEmailInList(
958 kAccountsPrefUsers, username, wildcard_match); 956 kAccountsPrefUsers, username, wildcard_match);
959 } 957 }
960 958
961 } // namespace chromeos 959 } // namespace chromeos
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/chrome_content_browser_client.cc ('k') | trunk/src/chrome/browser/diagnostics/sqlite_diagnostics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698