OLD | NEW |
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 "chrome/browser/profiles/off_the_record_profile_impl.h" | 5 #include "chrome/browser/profiles/off_the_record_profile_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "chrome/common/pref_names.h" | 45 #include "chrome/common/pref_names.h" |
46 #include "chrome/common/render_messages.h" | 46 #include "chrome/common/render_messages.h" |
47 #include "content/browser/appcache/chrome_appcache_service.h" | 47 #include "content/browser/appcache/chrome_appcache_service.h" |
48 #include "content/browser/browser_thread.h" | 48 #include "content/browser/browser_thread.h" |
49 #include "content/browser/chrome_blob_storage_context.h" | 49 #include "content/browser/chrome_blob_storage_context.h" |
50 #include "content/browser/file_system/browser_file_system_helper.h" | 50 #include "content/browser/file_system/browser_file_system_helper.h" |
51 #include "content/browser/host_zoom_map.h" | 51 #include "content/browser/host_zoom_map.h" |
52 #include "content/browser/in_process_webkit/webkit_context.h" | 52 #include "content/browser/in_process_webkit/webkit_context.h" |
53 #include "content/browser/ssl/ssl_host_state.h" | 53 #include "content/browser/ssl/ssl_host_state.h" |
54 #include "content/browser/tab_contents/tab_contents.h" | 54 #include "content/browser/tab_contents/tab_contents.h" |
55 #include "content/common/notification_service.h" | 55 #include "content/public/browser/notification_service.h" |
56 #include "net/base/transport_security_state.h" | 56 #include "net/base/transport_security_state.h" |
57 #include "net/http/http_server_properties.h" | 57 #include "net/http/http_server_properties.h" |
58 #include "webkit/database/database_tracker.h" | 58 #include "webkit/database/database_tracker.h" |
59 #include "webkit/quota/quota_manager.h" | 59 #include "webkit/quota/quota_manager.h" |
60 | 60 |
61 #if defined(OS_CHROMEOS) | 61 #if defined(OS_CHROMEOS) |
62 #include "chrome/browser/chromeos/preferences.h" | 62 #include "chrome/browser/chromeos/preferences.h" |
63 #endif | 63 #endif |
64 | 64 |
65 namespace { | 65 namespace { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( | 110 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( |
111 PluginPrefs::GetForProfile(this), &GetResourceContext()); | 111 PluginPrefs::GetForProfile(this), &GetResourceContext()); |
112 | 112 |
113 BrowserThread::PostTask( | 113 BrowserThread::PostTask( |
114 BrowserThread::IO, FROM_HERE, | 114 BrowserThread::IO, FROM_HERE, |
115 NewRunnableFunction( | 115 NewRunnableFunction( |
116 &NotifyOTRProfileCreatedOnIOThread, profile_, this)); | 116 &NotifyOTRProfileCreatedOnIOThread, profile_, this)); |
117 } | 117 } |
118 | 118 |
119 OffTheRecordProfileImpl::~OffTheRecordProfileImpl() { | 119 OffTheRecordProfileImpl::~OffTheRecordProfileImpl() { |
120 NotificationService::current()->Notify( | 120 content::NotificationService::current()->Notify( |
121 chrome::NOTIFICATION_PROFILE_DESTROYED, content::Source<Profile>(this), | 121 chrome::NOTIFICATION_PROFILE_DESTROYED, content::Source<Profile>(this), |
122 NotificationService::NoDetails()); | 122 content::NotificationService::NoDetails()); |
123 | 123 |
124 ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext( | 124 ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext( |
125 &GetResourceContext()); | 125 &GetResourceContext()); |
126 | 126 |
127 ProfileDependencyManager::GetInstance()->DestroyProfileServices(this); | 127 ProfileDependencyManager::GetInstance()->DestroyProfileServices(this); |
128 | 128 |
129 BrowserThread::PostTask( | 129 BrowserThread::PostTask( |
130 BrowserThread::IO, FROM_HERE, | 130 BrowserThread::IO, FROM_HERE, |
131 NewRunnableFunction(&NotifyOTRProfileDestroyedOnIOThread, profile_, | 131 NewRunnableFunction(&NotifyOTRProfileDestroyedOnIOThread, profile_, |
132 this)); | 132 this)); |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 OffTheRecordProfileImpl* profile = NULL; | 646 OffTheRecordProfileImpl* profile = NULL; |
647 #if defined(OS_CHROMEOS) | 647 #if defined(OS_CHROMEOS) |
648 if (Profile::IsGuestSession()) | 648 if (Profile::IsGuestSession()) |
649 profile = new GuestSessionProfile(this); | 649 profile = new GuestSessionProfile(this); |
650 #endif | 650 #endif |
651 if (!profile) | 651 if (!profile) |
652 profile = new OffTheRecordProfileImpl(this); | 652 profile = new OffTheRecordProfileImpl(this); |
653 profile->Init(); | 653 profile->Init(); |
654 return profile; | 654 return profile; |
655 } | 655 } |
OLD | NEW |