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

Side by Side Diff: chrome/browser/profiles/profile_manager.cc

Issue 7042003: Revert 85732 (broke build) - Move SystemMonitor to base/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <set> 5 #include <set>
6 6
7 #include "chrome/browser/profiles/profile_manager.h" 7 #include "chrome/browser/profiles/profile_manager.h"
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 // static 105 // static
106 Profile* ProfileManager::GetDefaultProfile() { 106 Profile* ProfileManager::GetDefaultProfile() {
107 FilePath user_data_dir; 107 FilePath user_data_dir;
108 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); 108 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
109 ProfileManager* profile_manager = g_browser_process->profile_manager(); 109 ProfileManager* profile_manager = g_browser_process->profile_manager();
110 return profile_manager->GetDefaultProfile(user_data_dir); 110 return profile_manager->GetDefaultProfile(user_data_dir);
111 } 111 }
112 112
113 ProfileManager::ProfileManager() : logged_in_(false) { 113 ProfileManager::ProfileManager() : logged_in_(false) {
114 base::SystemMonitor::Get()->AddObserver(this); 114 ui::SystemMonitor::Get()->AddObserver(this);
115 BrowserList::AddObserver(this); 115 BrowserList::AddObserver(this);
116 #if defined(OS_CHROMEOS) 116 #if defined(OS_CHROMEOS)
117 registrar_.Add( 117 registrar_.Add(
118 this, 118 this,
119 NotificationType::LOGIN_USER_CHANGED, 119 NotificationType::LOGIN_USER_CHANGED,
120 NotificationService::AllSources()); 120 NotificationService::AllSources());
121 #endif 121 #endif
122 } 122 }
123 123
124 ProfileManager::~ProfileManager() { 124 ProfileManager::~ProfileManager() {
125 base::SystemMonitor* system_monitor = base::SystemMonitor::Get(); 125 ui::SystemMonitor* system_monitor = ui::SystemMonitor::Get();
126 if (system_monitor) 126 if (system_monitor)
127 system_monitor->RemoveObserver(this); 127 system_monitor->RemoveObserver(this);
128 BrowserList::RemoveObserver(this); 128 BrowserList::RemoveObserver(this);
129 } 129 }
130 130
131 FilePath ProfileManager::GetDefaultProfileDir( 131 FilePath ProfileManager::GetDefaultProfileDir(
132 const FilePath& user_data_dir) { 132 const FilePath& user_data_dir) {
133 FilePath default_profile_dir(user_data_dir); 133 FilePath default_profile_dir(user_data_dir);
134 default_profile_dir = 134 default_profile_dir =
135 default_profile_dir.AppendASCII(chrome::kNotSignedInProfile); 135 default_profile_dir.AppendASCII(chrome::kNotSignedInProfile);
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 NewProfileLauncher* launcher = new NewProfileLauncher(); 502 NewProfileLauncher* launcher = new NewProfileLauncher();
503 profile_manager->CreateProfileAsync(new_path, launcher); 503 profile_manager->CreateProfileAsync(new_path, launcher);
504 } 504 }
505 505
506 // static 506 // static
507 void ProfileManager::RegisterPrefs(PrefService* prefs) { 507 void ProfileManager::RegisterPrefs(PrefService* prefs) {
508 prefs->RegisterStringPref(prefs::kProfileLastUsed, ""); 508 prefs->RegisterStringPref(prefs::kProfileLastUsed, "");
509 prefs->RegisterDictionaryPref(prefs::kProfileDirectoryMap); 509 prefs->RegisterDictionaryPref(prefs::kProfileDirectoryMap);
510 prefs->RegisterIntegerPref(prefs::kProfilesNumCreated, 1); 510 prefs->RegisterIntegerPref(prefs::kProfilesNumCreated, 1);
511 } 511 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_manager.h ('k') | chrome/browser/profiles/profile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698