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

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

Issue 1142005: Mocks for all libcros elements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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
« no previous file with comments | « chrome/browser/dom_ui/filebrowse_ui.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/profile_manager.h" 7 #include "chrome/browser/profile_manager.h"
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 NewRunnableFunction(&ProfileManager::ResumeProfile, *i)); 220 NewRunnableFunction(&ProfileManager::ResumeProfile, *i));
221 } 221 }
222 } 222 }
223 223
224 void ProfileManager::Observe( 224 void ProfileManager::Observe(
225 NotificationType type, 225 NotificationType type,
226 const NotificationSource& source, 226 const NotificationSource& source,
227 const NotificationDetails& details) { 227 const NotificationDetails& details) {
228 #if defined(OS_CHROMEOS) 228 #if defined(OS_CHROMEOS)
229 if (type == NotificationType::LOGIN_USER_CHANGED) { 229 if (type == NotificationType::LOGIN_USER_CHANGED) {
230 CHECK(chromeos::CrosLibrary::EnsureLoaded()); 230 CHECK(chromeos::CrosLibrary::Get()->EnsureLoaded());
231 // If we don't have a mounted profile directory we're in trouble. 231 // If we don't have a mounted profile directory we're in trouble.
232 // TODO(davemoore) Once we have better api this check should ensure that 232 // TODO(davemoore) Once we have better api this check should ensure that
233 // our profile directory is the one that's mounted, and that it's mounted 233 // our profile directory is the one that's mounted, and that it's mounted
234 // as the current user. 234 // as the current user.
235 CHECK(chromeos::CryptohomeLibrary::Get()->IsMounted()); 235 CHECK(chromeos::CrosLibrary::Get()->GetCryptohomeLibrary()->IsMounted());
236 logged_in_ = true; 236 logged_in_ = true;
237 } 237 }
238 #endif 238 #endif
239 } 239 }
240 240
241 void ProfileManager::SuspendProfile(Profile* profile) { 241 void ProfileManager::SuspendProfile(Profile* profile) {
242 DCHECK(profile); 242 DCHECK(profile);
243 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); 243 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
244 244
245 for (URLRequestJobTracker::JobIterator i = g_url_request_job_tracker.begin(); 245 for (URLRequestJobTracker::JobIterator i = g_url_request_job_tracker.begin();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 if (!file_util::PathExists(path)) { 277 if (!file_util::PathExists(path)) {
278 // TODO(tc): http://b/1094718 Bad things happen if we can't write to the 278 // TODO(tc): http://b/1094718 Bad things happen if we can't write to the
279 // profile directory. We should eventually be able to run in this 279 // profile directory. We should eventually be able to run in this
280 // situation. 280 // situation.
281 if (!file_util::CreateDirectory(path)) 281 if (!file_util::CreateDirectory(path))
282 return NULL; 282 return NULL;
283 } 283 }
284 284
285 return Profile::CreateProfile(path); 285 return Profile::CreateProfile(path);
286 } 286 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/filebrowse_ui.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698