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/profiles/profile_manager.h" | 5 #include "chrome/browser/profiles/profile_manager.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "chrome/common/logging_chrome.h" | 48 #include "chrome/common/logging_chrome.h" |
49 #include "chrome/common/pref_names.h" | 49 #include "chrome/common/pref_names.h" |
50 #include "chrome/common/url_constants.h" | 50 #include "chrome/common/url_constants.h" |
51 #include "chrome/grit/generated_resources.h" | 51 #include "chrome/grit/generated_resources.h" |
52 #include "components/bookmarks/browser/bookmark_model.h" | 52 #include "components/bookmarks/browser/bookmark_model.h" |
53 #include "components/password_manager/core/browser/password_store.h" | 53 #include "components/password_manager/core/browser/password_store.h" |
54 #include "components/signin/core/common/profile_management_switches.h" | 54 #include "components/signin/core/common/profile_management_switches.h" |
55 #include "content/public/browser/browser_thread.h" | 55 #include "content/public/browser/browser_thread.h" |
56 #include "content/public/browser/notification_service.h" | 56 #include "content/public/browser/notification_service.h" |
57 #include "content/public/browser/user_metrics.h" | 57 #include "content/public/browser/user_metrics.h" |
58 #include "extensions/browser/extension_registry.h" | |
59 #include "extensions/common/extension_set.h" | |
60 #include "extensions/common/manifest.h" | |
61 #include "net/http/http_transaction_factory.h" | 58 #include "net/http/http_transaction_factory.h" |
62 #include "net/url_request/url_request_context.h" | 59 #include "net/url_request/url_request_context.h" |
63 #include "net/url_request/url_request_context_getter.h" | 60 #include "net/url_request/url_request_context_getter.h" |
64 #include "net/url_request/url_request_job.h" | 61 #include "net/url_request/url_request_job.h" |
65 #include "ui/base/l10n/l10n_util.h" | 62 #include "ui/base/l10n/l10n_util.h" |
66 | 63 |
| 64 #if defined(ENABLE_EXTENSIONS) |
| 65 #include "chrome/browser/extensions/extension_service.h" |
| 66 #include "extensions/browser/extension_registry.h" |
| 67 #include "extensions/browser/extension_system.h" |
| 68 #include "extensions/common/extension_set.h" |
| 69 #include "extensions/common/manifest.h" |
| 70 #endif |
| 71 |
67 #if defined(ENABLE_MANAGED_USERS) | 72 #if defined(ENABLE_MANAGED_USERS) |
68 #include "chrome/browser/supervised_user/supervised_user_service.h" | 73 #include "chrome/browser/supervised_user/supervised_user_service.h" |
69 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | 74 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
70 #endif | 75 #endif |
71 | 76 |
72 #if !defined(OS_IOS) | 77 #if !defined(OS_IOS) |
73 #include "chrome/browser/extensions/extension_service.h" | |
74 #include "chrome/browser/sessions/session_service_factory.h" | 78 #include "chrome/browser/sessions/session_service_factory.h" |
75 #include "chrome/browser/ui/browser_list.h" | 79 #include "chrome/browser/ui/browser_list.h" |
76 #include "extensions/browser/extension_system.h" | |
77 #endif // !defined (OS_IOS) | 80 #endif // !defined (OS_IOS) |
78 | 81 |
79 #if defined(OS_WIN) | 82 #if defined(OS_WIN) |
80 #include "base/win/metro.h" | 83 #include "base/win/metro.h" |
81 #include "chrome/installer/util/browser_distribution.h" | 84 #include "chrome/installer/util/browser_distribution.h" |
82 #endif | 85 #endif |
83 | 86 |
84 #if defined(OS_CHROMEOS) | 87 #if defined(OS_CHROMEOS) |
85 #include "chrome/browser/browser_process_platform_part_chromeos.h" | 88 #include "chrome/browser/browser_process_platform_part_chromeos.h" |
86 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 89 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
87 #include "chrome/browser/profiles/profiles_state.h" | |
88 #include "chromeos/chromeos_switches.h" | 90 #include "chromeos/chromeos_switches.h" |
89 #include "chromeos/dbus/cryptohome_client.h" | 91 #include "chromeos/dbus/cryptohome_client.h" |
90 #include "chromeos/dbus/dbus_thread_manager.h" | 92 #include "chromeos/dbus/dbus_thread_manager.h" |
91 #include "components/user_manager/user.h" | 93 #include "components/user_manager/user.h" |
92 #include "components/user_manager/user_manager.h" | 94 #include "components/user_manager/user_manager.h" |
93 #endif | 95 #endif |
94 | 96 |
95 using base::UserMetricsAction; | 97 using base::UserMetricsAction; |
96 using content::BrowserThread; | 98 using content::BrowserThread; |
97 | 99 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 if ((*iter)->is_app() && | 214 if ((*iter)->is_app() && |
213 (*iter)->location() != extensions::Manifest::COMPONENT) { | 215 (*iter)->location() != extensions::Manifest::COMPONENT) { |
214 ++installed_apps; | 216 ++installed_apps; |
215 } | 217 } |
216 } | 218 } |
217 return installed_apps; | 219 return installed_apps; |
218 } | 220 } |
219 | 221 |
220 #endif // ENABLE_EXTENSIONS | 222 #endif // ENABLE_EXTENSIONS |
221 | 223 |
222 } // namespace | 224 } // namespace |
223 | 225 |
224 ProfileManager::ProfileManager(const base::FilePath& user_data_dir) | 226 ProfileManager::ProfileManager(const base::FilePath& user_data_dir) |
225 : user_data_dir_(user_data_dir), | 227 : user_data_dir_(user_data_dir), |
226 logged_in_(false), | 228 logged_in_(false), |
227 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 229 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
228 browser_list_observer_(this), | 230 browser_list_observer_(this), |
229 #endif | 231 #endif |
230 closing_all_browsers_(false) { | 232 closing_all_browsers_(false) { |
231 #if defined(OS_CHROMEOS) | 233 #if defined(OS_CHROMEOS) |
232 registrar_.Add( | 234 registrar_.Add( |
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1304 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); | 1306 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); |
1305 FinishDeletingProfile(profile_to_delete_path); | 1307 FinishDeletingProfile(profile_to_delete_path); |
1306 } | 1308 } |
1307 } | 1309 } |
1308 } | 1310 } |
1309 #endif | 1311 #endif |
1310 | 1312 |
1311 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1313 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
1312 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1314 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
1313 } | 1315 } |
OLD | NEW |