OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/profile_impl.h" | 5 #include "chrome/browser/profile_impl.h" |
6 | 6 |
7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "chrome/browser/geolocation/geolocation_permission_context.h" | 44 #include "chrome/browser/geolocation/geolocation_permission_context.h" |
45 #include "chrome/browser/history/history.h" | 45 #include "chrome/browser/history/history.h" |
46 #include "chrome/browser/history/top_sites.h" | 46 #include "chrome/browser/history/top_sites.h" |
47 #include "chrome/browser/host_content_settings_map.h" | 47 #include "chrome/browser/host_content_settings_map.h" |
48 #include "chrome/browser/host_zoom_map.h" | 48 #include "chrome/browser/host_zoom_map.h" |
49 #include "chrome/browser/instant/instant_controller.h" | 49 #include "chrome/browser/instant/instant_controller.h" |
50 #include "chrome/browser/in_process_webkit/webkit_context.h" | 50 #include "chrome/browser/in_process_webkit/webkit_context.h" |
51 #include "chrome/browser/net/chrome_url_request_context.h" | 51 #include "chrome/browser/net/chrome_url_request_context.h" |
52 #include "chrome/browser/net/gaia/token_service.h" | 52 #include "chrome/browser/net/gaia/token_service.h" |
53 #include "chrome/browser/net/net_pref_observer.h" | 53 #include "chrome/browser/net/net_pref_observer.h" |
| 54 #include "chrome/browser/net/pref_proxy_config_service.h" |
54 #include "chrome/browser/net/ssl_config_service_manager.h" | 55 #include "chrome/browser/net/ssl_config_service_manager.h" |
55 #include "chrome/browser/notifications/desktop_notification_service.h" | 56 #include "chrome/browser/notifications/desktop_notification_service.h" |
56 #include "chrome/browser/password_manager/password_store_default.h" | 57 #include "chrome/browser/password_manager/password_store_default.h" |
57 #include "chrome/browser/policy/configuration_policy_provider.h" | 58 #include "chrome/browser/policy/configuration_policy_provider.h" |
58 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 59 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
59 #include "chrome/browser/policy/profile_policy_context.h" | 60 #include "chrome/browser/policy/profile_policy_context.h" |
60 #include "chrome/browser/prefs/browser_prefs.h" | 61 #include "chrome/browser/prefs/browser_prefs.h" |
61 #include "chrome/browser/prefs/pref_value_store.h" | 62 #include "chrome/browser/prefs/pref_value_store.h" |
62 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 63 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
63 #include "chrome/browser/profile_manager.h" | 64 #include "chrome/browser/profile_manager.h" |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 // FaviconService depends on HistoryServce so make sure we delete | 557 // FaviconService depends on HistoryServce so make sure we delete |
557 // HistoryService first. | 558 // HistoryService first. |
558 favicon_service_ = NULL; | 559 favicon_service_ = NULL; |
559 | 560 |
560 if (extension_message_service_) | 561 if (extension_message_service_) |
561 extension_message_service_->DestroyingProfile(); | 562 extension_message_service_->DestroyingProfile(); |
562 | 563 |
563 if (extensions_service_) | 564 if (extensions_service_) |
564 extensions_service_->DestroyingProfile(); | 565 extensions_service_->DestroyingProfile(); |
565 | 566 |
| 567 if (pref_proxy_config_tracker_) |
| 568 pref_proxy_config_tracker_->DetachFromPrefService(); |
| 569 |
566 // This causes the Preferences file to be written to disk. | 570 // This causes the Preferences file to be written to disk. |
567 MarkAsCleanShutdown(); | 571 MarkAsCleanShutdown(); |
568 } | 572 } |
569 | 573 |
570 ProfileId ProfileImpl::GetRuntimeId() { | 574 ProfileId ProfileImpl::GetRuntimeId() { |
571 return reinterpret_cast<ProfileId>(this); | 575 return reinterpret_cast<ProfileId>(this); |
572 } | 576 } |
573 | 577 |
574 FilePath ProfileImpl::GetPath() { | 578 FilePath ProfileImpl::GetPath() { |
575 return path_; | 579 return path_; |
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1350 #if defined(OS_CHROMEOS) | 1354 #if defined(OS_CHROMEOS) |
1351 chromeos::ProxyConfigServiceImpl* | 1355 chromeos::ProxyConfigServiceImpl* |
1352 ProfileImpl::GetChromeOSProxyConfigServiceImpl() { | 1356 ProfileImpl::GetChromeOSProxyConfigServiceImpl() { |
1353 if (!chromeos_proxy_config_service_impl_) { | 1357 if (!chromeos_proxy_config_service_impl_) { |
1354 chromeos_proxy_config_service_impl_ = | 1358 chromeos_proxy_config_service_impl_ = |
1355 new chromeos::ProxyConfigServiceImpl(); | 1359 new chromeos::ProxyConfigServiceImpl(); |
1356 } | 1360 } |
1357 return chromeos_proxy_config_service_impl_; | 1361 return chromeos_proxy_config_service_impl_; |
1358 } | 1362 } |
1359 #endif // defined(OS_CHROMEOS) | 1363 #endif // defined(OS_CHROMEOS) |
| 1364 |
| 1365 PrefProxyConfigTracker* ProfileImpl::GetProxyConfigTracker() { |
| 1366 if (!pref_proxy_config_tracker_) |
| 1367 pref_proxy_config_tracker_ = new PrefProxyConfigTracker(GetPrefs()); |
| 1368 |
| 1369 return pref_proxy_config_tracker_; |
| 1370 } |
OLD | NEW |