| 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 "content/browser/renderer_host/render_message_filter.h" | 5 #include "content/browser/renderer_host/render_message_filter.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 net::CompletionCallbackImpl<DoomEntriesHelper> callback_; | 272 net::CompletionCallbackImpl<DoomEntriesHelper> callback_; |
| 273 ClearCacheCompletion* user_callback_; | 273 ClearCacheCompletion* user_callback_; |
| 274 }; | 274 }; |
| 275 | 275 |
| 276 } // namespace | 276 } // namespace |
| 277 | 277 |
| 278 RenderMessageFilter::RenderMessageFilter( | 278 RenderMessageFilter::RenderMessageFilter( |
| 279 int render_process_id, | 279 int render_process_id, |
| 280 PluginService* plugin_service, | 280 PluginService* plugin_service, |
| 281 Profile* profile, | 281 Profile* profile, |
| 282 URLRequestContextGetter* request_context, |
| 282 RenderWidgetHelper* render_widget_helper) | 283 RenderWidgetHelper* render_widget_helper) |
| 283 : resource_dispatcher_host_(g_browser_process->resource_dispatcher_host()), | 284 : resource_dispatcher_host_(g_browser_process->resource_dispatcher_host()), |
| 284 plugin_service_(plugin_service), | 285 plugin_service_(plugin_service), |
| 285 profile_(profile), | 286 profile_(profile), |
| 286 content_settings_(profile->GetHostContentSettingsMap()), | 287 content_settings_(profile->GetHostContentSettingsMap()), |
| 288 request_context_(request_context), |
| 287 extensions_request_context_(profile->GetRequestContextForExtensions()), | 289 extensions_request_context_(profile->GetRequestContextForExtensions()), |
| 288 render_widget_helper_(render_widget_helper), | 290 render_widget_helper_(render_widget_helper), |
| 289 notification_prefs_( | 291 notification_prefs_( |
| 290 profile->GetDesktopNotificationService()->prefs_cache()), | 292 profile->GetDesktopNotificationService()->prefs_cache()), |
| 291 host_zoom_map_(profile->GetHostZoomMap()), | 293 host_zoom_map_(profile->GetHostZoomMap()), |
| 292 off_the_record_(profile->IsOffTheRecord()), | 294 off_the_record_(profile->IsOffTheRecord()), |
| 293 webkit_context_(profile->GetWebKitContext()), | 295 webkit_context_(profile->GetWebKitContext()), |
| 294 render_process_id_(render_process_id) { | 296 render_process_id_(render_process_id) { |
| 295 request_context_ = profile_->GetRequestContext(); | |
| 296 DCHECK(request_context_); | 297 DCHECK(request_context_); |
| 297 | 298 |
| 298 render_widget_helper_->Init(render_process_id_, resource_dispatcher_host_); | 299 render_widget_helper_->Init(render_process_id_, resource_dispatcher_host_); |
| 299 } | 300 } |
| 300 | 301 |
| 301 RenderMessageFilter::~RenderMessageFilter() { | 302 RenderMessageFilter::~RenderMessageFilter() { |
| 302 // This function should be called on the IO thread. | 303 // This function should be called on the IO thread. |
| 303 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 304 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 304 } | 305 } |
| 305 | 306 |
| (...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 } | 1347 } |
| 1347 | 1348 |
| 1348 CookiesEnabledCompletion::~CookiesEnabledCompletion() {} | 1349 CookiesEnabledCompletion::~CookiesEnabledCompletion() {} |
| 1349 | 1350 |
| 1350 void CookiesEnabledCompletion::RunWithParams(const Tuple1<int>& params) { | 1351 void CookiesEnabledCompletion::RunWithParams(const Tuple1<int>& params) { |
| 1351 bool result = params.a != net::ERR_ACCESS_DENIED; | 1352 bool result = params.a != net::ERR_ACCESS_DENIED; |
| 1352 ViewHostMsg_CookiesEnabled::WriteReplyParams(reply_msg_, result); | 1353 ViewHostMsg_CookiesEnabled::WriteReplyParams(reply_msg_, result); |
| 1353 filter_->Send(reply_msg_); | 1354 filter_->Send(reply_msg_); |
| 1354 delete this; | 1355 delete this; |
| 1355 } | 1356 } |
| OLD | NEW |