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

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

Issue 7256002: Multi-Profiles: New Profile Setup UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 9 years, 5 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"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/string_number_conversions.h" 13 #include "base/string_number_conversions.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/prefs/pref_service.h" 17 #include "chrome/browser/prefs/pref_service.h"
18 #include "chrome/browser/prefs/scoped_user_pref_update.h" 18 #include "chrome/browser/prefs/scoped_user_pref_update.h"
19 #include "chrome/browser/profiles/profile_info_cache.h"
19 #include "chrome/browser/sessions/session_service_factory.h" 20 #include "chrome/browser/sessions/session_service_factory.h"
20 #include "chrome/browser/sync/profile_sync_service.h" 21 #include "chrome/browser/sync/profile_sync_service.h"
21 #include "chrome/browser/ui/browser_window.h" 22 #include "chrome/browser/ui/browser_window.h"
22 #include "chrome/common/chrome_constants.h" 23 #include "chrome/common/chrome_constants.h"
23 #include "chrome/common/chrome_paths.h" 24 #include "chrome/common/chrome_paths.h"
24 #include "chrome/common/chrome_switches.h" 25 #include "chrome/common/chrome_switches.h"
25 #include "chrome/common/logging_chrome.h" 26 #include "chrome/common/logging_chrome.h"
26 #include "chrome/common/pref_names.h" 27 #include "chrome/common/pref_names.h"
27 #include "content/browser/browser_thread.h" 28 #include "content/browser/browser_thread.h"
28 #include "content/common/notification_service.h" 29 #include "content/common/notification_service.h"
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 FilePath file_path(ASCIIToWide(*it)); 498 FilePath file_path(ASCIIToWide(*it));
498 #endif 499 #endif
499 500
500 // Pending, need to insert it alphabetically. 501 // Pending, need to insert it alphabetically.
501 profiles.push_back(std::pair<FilePath, string16>(file_path, name)); 502 profiles.push_back(std::pair<FilePath, string16>(file_path, name));
502 } 503 }
503 504
504 std::sort(profiles.begin(), profiles.end(), CompareProfilePathAndName); 505 std::sort(profiles.begin(), profiles.end(), CompareProfilePathAndName);
505 return profiles; 506 return profiles;
506 } 507 }
508
509 ProfileInfoCache& ProfileManager::GetProfileInfoCache() {
510 if (!profile_info_cache_.get()) {
511 FilePath user_data_dir;
512 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
513 profile_info_cache_.reset(new ProfileInfoCache(
514 g_browser_process->local_state(), user_data_dir));
515 }
516 return *profile_info_cache_.get();
517 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698