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" |
11 #include "base/deferred_sequenced_task_runner.h" | 11 #include "base/deferred_sequenced_task_runner.h" |
12 #include "base/files/file_enumerator.h" | 12 #include "base/files/file_enumerator.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
15 #include "base/metrics/histogram_macros.h" | 15 #include "base/metrics/histogram_macros.h" |
16 #include "base/prefs/pref_service.h" | 16 #include "base/prefs/pref_service.h" |
17 #include "base/prefs/scoped_user_pref_update.h" | 17 #include "base/prefs/scoped_user_pref_update.h" |
18 #include "base/profiler/scoped_profile.h" | 18 #include "base/profiler/scoped_profile.h" |
19 #include "base/strings/string_number_conversions.h" | 19 #include "base/strings/string_number_conversions.h" |
20 #include "base/strings/string_util.h" | 20 #include "base/strings/string_util.h" |
21 #include "base/strings/utf_string_conversions.h" | 21 #include "base/strings/utf_string_conversions.h" |
22 #include "base/trace_event/trace_event.h" | 22 #include "base/trace_event/trace_event.h" |
23 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 23 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 24 #include "chrome/browser/bookmarks/startup_task_runner_service_factory.h" |
24 #include "chrome/browser/browser_process.h" | 25 #include "chrome/browser/browser_process.h" |
25 #include "chrome/browser/chrome_notification_types.h" | 26 #include "chrome/browser/chrome_notification_types.h" |
26 #include "chrome/browser/download/download_service.h" | 27 #include "chrome/browser/download/download_service.h" |
27 #include "chrome/browser/download/download_service_factory.h" | 28 #include "chrome/browser/download/download_service_factory.h" |
28 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 29 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
29 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" | 30 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
30 #include "chrome/browser/password_manager/password_store_factory.h" | 31 #include "chrome/browser/password_manager/password_store_factory.h" |
31 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 32 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
32 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" | 33 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" |
33 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 34 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
34 #include "chrome/browser/profiles/profile_destroyer.h" | 35 #include "chrome/browser/profiles/profile_destroyer.h" |
35 #include "chrome/browser/profiles/profile_info_cache.h" | 36 #include "chrome/browser/profiles/profile_info_cache.h" |
36 #include "chrome/browser/profiles/profile_metrics.h" | 37 #include "chrome/browser/profiles/profile_metrics.h" |
37 #include "chrome/browser/profiles/profiles_state.h" | 38 #include "chrome/browser/profiles/profiles_state.h" |
38 #include "chrome/browser/profiles/startup_task_runner_service.h" | |
39 #include "chrome/browser/profiles/startup_task_runner_service_factory.h" | |
40 #include "chrome/browser/signin/account_reconcilor_factory.h" | 39 #include "chrome/browser/signin/account_reconcilor_factory.h" |
41 #include "chrome/browser/signin/account_tracker_service_factory.h" | 40 #include "chrome/browser/signin/account_tracker_service_factory.h" |
42 #include "chrome/browser/signin/cross_device_promo.h" | 41 #include "chrome/browser/signin/cross_device_promo.h" |
43 #include "chrome/browser/signin/cross_device_promo_factory.h" | 42 #include "chrome/browser/signin/cross_device_promo_factory.h" |
44 #include "chrome/browser/signin/gaia_cookie_manager_service_factory.h" | 43 #include "chrome/browser/signin/gaia_cookie_manager_service_factory.h" |
45 #include "chrome/browser/signin/signin_manager_factory.h" | 44 #include "chrome/browser/signin/signin_manager_factory.h" |
46 #include "chrome/browser/sync/profile_sync_service.h" | 45 #include "chrome/browser/sync/profile_sync_service.h" |
47 #include "chrome/browser/sync/profile_sync_service_factory.h" | 46 #include "chrome/browser/sync/profile_sync_service_factory.h" |
48 #include "chrome/browser/ui/browser.h" | 47 #include "chrome/browser/ui/browser.h" |
49 #include "chrome/browser/ui/browser_iterator.h" | 48 #include "chrome/browser/ui/browser_iterator.h" |
50 #include "chrome/browser/ui/sync/sync_promo_ui.h" | 49 #include "chrome/browser/ui/sync/sync_promo_ui.h" |
51 #include "chrome/common/chrome_constants.h" | 50 #include "chrome/common/chrome_constants.h" |
52 #include "chrome/common/chrome_paths_internal.h" | 51 #include "chrome/common/chrome_paths_internal.h" |
53 #include "chrome/common/chrome_switches.h" | 52 #include "chrome/common/chrome_switches.h" |
54 #include "chrome/common/logging_chrome.h" | 53 #include "chrome/common/logging_chrome.h" |
55 #include "chrome/common/pref_names.h" | 54 #include "chrome/common/pref_names.h" |
56 #include "chrome/common/url_constants.h" | 55 #include "chrome/common/url_constants.h" |
57 #include "chrome/grit/generated_resources.h" | 56 #include "chrome/grit/generated_resources.h" |
58 #include "components/bookmarks/browser/bookmark_model.h" | 57 #include "components/bookmarks/browser/bookmark_model.h" |
| 58 #include "components/bookmarks/browser/startup_task_runner_service.h" |
59 #include "components/content_settings/core/browser/host_content_settings_map.h" | 59 #include "components/content_settings/core/browser/host_content_settings_map.h" |
60 #include "components/password_manager/core/browser/password_store.h" | 60 #include "components/password_manager/core/browser/password_store.h" |
61 #include "components/signin/core/browser/account_tracker_service.h" | 61 #include "components/signin/core/browser/account_tracker_service.h" |
62 #include "components/signin/core/browser/gaia_cookie_manager_service.h" | 62 #include "components/signin/core/browser/gaia_cookie_manager_service.h" |
63 #include "components/signin/core/browser/signin_manager.h" | 63 #include "components/signin/core/browser/signin_manager.h" |
64 #include "components/signin/core/common/profile_management_switches.h" | 64 #include "components/signin/core/common/profile_management_switches.h" |
65 #include "content/public/browser/browser_thread.h" | 65 #include "content/public/browser/browser_thread.h" |
66 #include "content/public/browser/notification_service.h" | 66 #include "content/public/browser/notification_service.h" |
67 #include "content/public/browser/user_metrics.h" | 67 #include "content/public/browser/user_metrics.h" |
68 #include "net/http/http_transaction_factory.h" | 68 #include "net/http/http_transaction_factory.h" |
(...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1469 } | 1469 } |
1470 | 1470 |
1471 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); | 1471 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); |
1472 if (!original_callback.is_null()) | 1472 if (!original_callback.is_null()) |
1473 original_callback.Run(loaded_profile, status); | 1473 original_callback.Run(loaded_profile, status); |
1474 } | 1474 } |
1475 | 1475 |
1476 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1476 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
1477 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1477 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
1478 } | 1478 } |
OLD | NEW |