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.h" | 5 #include "chrome/browser/profile.h" |
6 | 6 |
7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
8 #include "app/theme_provider.h" | 8 #include "app/theme_provider.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/env_var.h" | 10 #include "base/env_var.h" |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 virtual HostContentSettingsMap* GetHostContentSettingsMap() { | 442 virtual HostContentSettingsMap* GetHostContentSettingsMap() { |
443 // Retrieve the host content settings map of the parent profile in order to | 443 // Retrieve the host content settings map of the parent profile in order to |
444 // ensure the preferences have been migrated. | 444 // ensure the preferences have been migrated. |
445 profile_->GetHostContentSettingsMap(); | 445 profile_->GetHostContentSettingsMap(); |
446 if (!host_content_settings_map_.get()) | 446 if (!host_content_settings_map_.get()) |
447 host_content_settings_map_ = new HostContentSettingsMap(this); | 447 host_content_settings_map_ = new HostContentSettingsMap(this); |
448 return host_content_settings_map_.get(); | 448 return host_content_settings_map_.get(); |
449 } | 449 } |
450 | 450 |
451 virtual HostZoomMap* GetHostZoomMap() { | 451 virtual HostZoomMap* GetHostZoomMap() { |
452 return profile_->GetHostZoomMap(); | 452 if (!host_zoom_map_) |
| 453 host_zoom_map_ = new HostZoomMap(this); |
| 454 return host_zoom_map_.get(); |
453 } | 455 } |
454 | 456 |
455 virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap() { | 457 virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap() { |
456 return profile_->GetGeolocationContentSettingsMap(); | 458 return profile_->GetGeolocationContentSettingsMap(); |
457 } | 459 } |
458 | 460 |
459 virtual GeolocationPermissionContext* GetGeolocationPermissionContext() { | 461 virtual GeolocationPermissionContext* GetGeolocationPermissionContext() { |
460 return profile_->GetGeolocationPermissionContext(); | 462 return profile_->GetGeolocationPermissionContext(); |
461 } | 463 } |
462 | 464 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 | 596 |
595 // The download manager that only stores downloaded items in memory. | 597 // The download manager that only stores downloaded items in memory. |
596 scoped_refptr<DownloadManager> download_manager_; | 598 scoped_refptr<DownloadManager> download_manager_; |
597 | 599 |
598 // Use a separate desktop notification service for OTR. | 600 // Use a separate desktop notification service for OTR. |
599 scoped_ptr<DesktopNotificationService> desktop_notification_service_; | 601 scoped_ptr<DesktopNotificationService> desktop_notification_service_; |
600 | 602 |
601 // We use a non-writable content settings map for OTR. | 603 // We use a non-writable content settings map for OTR. |
602 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 604 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
603 | 605 |
| 606 // Use a separate zoom map for OTR. |
| 607 scoped_refptr<HostZoomMap> host_zoom_map_; |
| 608 |
604 // Use a special WebKit context for OTR browsing. | 609 // Use a special WebKit context for OTR browsing. |
605 scoped_refptr<WebKitContext> webkit_context_; | 610 scoped_refptr<WebKitContext> webkit_context_; |
606 | 611 |
607 // We don't want SSLHostState from the OTR profile to leak back to the main | 612 // We don't want SSLHostState from the OTR profile to leak back to the main |
608 // profile because then the main profile would learn some of the host names | 613 // profile because then the main profile would learn some of the host names |
609 // the user visited while OTR. | 614 // the user visited while OTR. |
610 scoped_ptr<SSLHostState> ssl_host_state_; | 615 scoped_ptr<SSLHostState> ssl_host_state_; |
611 | 616 |
612 // Use a separate FindBarState so search terms do not leak back to the main | 617 // Use a separate FindBarState so search terms do not leak back to the main |
613 // profile. | 618 // profile. |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1504 CommandLine::ForCurrentProcess())); | 1509 CommandLine::ForCurrentProcess())); |
1505 sync_service_.reset( | 1510 sync_service_.reset( |
1506 profile_sync_factory_->CreateProfileSyncService()); | 1511 profile_sync_factory_->CreateProfileSyncService()); |
1507 sync_service_->Initialize(); | 1512 sync_service_->Initialize(); |
1508 } | 1513 } |
1509 | 1514 |
1510 void ProfileImpl::InitCloudPrintProxyService() { | 1515 void ProfileImpl::InitCloudPrintProxyService() { |
1511 cloud_print_proxy_service_.reset(new CloudPrintProxyService(this)); | 1516 cloud_print_proxy_service_.reset(new CloudPrintProxyService(this)); |
1512 cloud_print_proxy_service_->Initialize(); | 1517 cloud_print_proxy_service_->Initialize(); |
1513 } | 1518 } |
OLD | NEW |