Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: chrome/browser/renderer_host/safe_browsing_resource_throttle.cc

Issue 2133083002: Remove all remaining traces of MessageLoopProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/renderer_host/safe_browsing_resource_throttle.h" 5 #include "chrome/browser/renderer_host/safe_browsing_resource_throttle.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 SafeBrowsingUIManager::UnsafeResource resource; 253 SafeBrowsingUIManager::UnsafeResource resource;
254 resource.url = url; 254 resource.url = url;
255 resource.original_url = request_->original_url(); 255 resource.original_url = request_->original_url();
256 resource.redirect_urls = redirect_urls_; 256 resource.redirect_urls = redirect_urls_;
257 resource.is_subresource = resource_type_ != content::RESOURCE_TYPE_MAIN_FRAME; 257 resource.is_subresource = resource_type_ != content::RESOURCE_TYPE_MAIN_FRAME;
258 resource.is_subframe = resource_type_ == content::RESOURCE_TYPE_SUB_FRAME; 258 resource.is_subframe = resource_type_ == content::RESOURCE_TYPE_SUB_FRAME;
259 resource.threat_type = threat_type; 259 resource.threat_type = threat_type;
260 resource.threat_metadata = metadata; 260 resource.threat_metadata = metadata;
261 resource.callback = base::Bind( 261 resource.callback = base::Bind(
262 &SafeBrowsingResourceThrottle::OnBlockingPageComplete, AsWeakPtr()); 262 &SafeBrowsingResourceThrottle::OnBlockingPageComplete, AsWeakPtr());
263 resource.callback_thread = 263 resource.callback_thread = content::BrowserThread::GetTaskRunnerForThread(
264 content::BrowserThread::GetMessageLoopProxyForThread( 264 content::BrowserThread::IO);
265 content::BrowserThread::IO);
266 resource.render_process_host_id = info->GetChildID(); 265 resource.render_process_host_id = info->GetChildID();
267 resource.render_frame_id = info->GetRenderFrameID(); 266 resource.render_frame_id = info->GetRenderFrameID();
268 resource.threat_source = database_manager_->GetThreatSource(); 267 resource.threat_source = database_manager_->GetThreatSource();
269 268
270 state_ = STATE_DISPLAYING_BLOCKING_PAGE; 269 state_ = STATE_DISPLAYING_BLOCKING_PAGE;
271 270
272 content::BrowserThread::PostTask( 271 content::BrowserThread::PostTask(
273 content::BrowserThread::UI, 272 content::BrowserThread::UI,
274 FROM_HERE, 273 FROM_HERE,
275 base::Bind(&SafeBrowsingResourceThrottle::StartDisplayingBlockingPage, 274 base::Bind(&SafeBrowsingResourceThrottle::StartDisplayingBlockingPage,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 unchecked_redirect_url_, "defer_reason", 393 unchecked_redirect_url_, "defer_reason",
395 "resumed_redirect"); 394 "resumed_redirect");
396 } 395 }
397 } 396 }
398 397
399 if (resume) { 398 if (resume) {
400 defer_state_ = DEFERRED_NONE; 399 defer_state_ = DEFERRED_NONE;
401 controller()->Resume(); 400 controller()->Resume();
402 } 401 }
403 } 402 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698