diff options
| author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-18 18:38:09 +0000 |
|---|---|---|
| committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-18 18:38:09 +0000 |
| commit | 8a58f9a5e0b7e62d38ceef9c6a3b691a8593e7d9 (patch) | |
| tree | 36f7876f1b49e7edf492198c79a587090e7e6233 /chrome/browser/ssl/ssl_error_handler.cc | |
| parent | 6e42e7275a6eb6d374e74367aa6c55c1df36568a (diff) | |
| download | chromium_src-8a58f9a5e0b7e62d38ceef9c6a3b691a8593e7d9.zip chromium_src-8a58f9a5e0b7e62d38ceef9c6a3b691a8593e7d9.tar.gz chromium_src-8a58f9a5e0b7e62d38ceef9c6a3b691a8593e7d9.tar.bz2 | |
Remove the mostly-unused FilterPolicy class. Convert the only actually-used bit, FILTER_EXTENSION_MESSAGES, into a bool that's only passed to places that really need it.
Also renames ExtensionMessageFilterPeer to ExtensionLocalizationPeer in hopes of making its one use more apparent. I added a couple comments too.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2105006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47533 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl/ssl_error_handler.cc')
| -rw-r--r-- | chrome/browser/ssl/ssl_error_handler.cc | 44 |
1 files changed, 3 insertions, 41 deletions
diff --git a/chrome/browser/ssl/ssl_error_handler.cc b/chrome/browser/ssl/ssl_error_handler.cc index 09594ac..e77ab15 100644 --- a/chrome/browser/ssl/ssl_error_handler.cc +++ b/chrome/browser/ssl/ssl_error_handler.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -41,8 +41,8 @@ SSLErrorHandler::SSLErrorHandler(ResourceDispatcherHost* rdh, // This makes sure we don't disappear on the IO thread until we've given an // answer to the URLRequest. // - // Release in CompleteCancelRequest, CompleteContinueRequest, - // CompleteStartRequest or CompleteTakeNoAction. + // Release in CompleteCancelRequest, CompleteContinueRequest, or + // CompleteTakeNoAction. AddRef(); } @@ -97,16 +97,6 @@ void SSLErrorHandler::ContinueRequest() { NewRunnableMethod(this, &SSLErrorHandler::CompleteContinueRequest)); } -void SSLErrorHandler::StartRequest(FilterPolicy::Type filter_policy) { - DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); - - // We need to complete this task on the IO thread. - ChromeThread::PostTask( - ChromeThread::IO, FROM_HERE, - NewRunnableMethod( - this, &SSLErrorHandler::CompleteStartRequest, filter_policy)); -} - void SSLErrorHandler::TakeNoAction() { DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); @@ -166,34 +156,6 @@ void SSLErrorHandler::CompleteContinueRequest() { Release(); } -void SSLErrorHandler::CompleteStartRequest(FilterPolicy::Type filter_policy) { - DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); - - // It is important that we notify the URLRequest only once. If we try to - // notify the request twice, it may no longer exist and |this| might have - // already have been deleted. - DCHECK(!request_has_been_notified_); - if (request_has_been_notified_) - return; - - URLRequest* request = resource_dispatcher_host_->GetURLRequest(request_id_); - if (request) { - // The request can be NULL if it was cancelled by the renderer (as the - // result of the user navigating to a new page from the location bar). - DLOG(INFO) << "CompleteStartRequest() url: " << request->url().spec(); - // The request should not have been started (SUCCESS is the initial state). - DCHECK(request->status().status() == URLRequestStatus::SUCCESS); - ResourceDispatcherHostRequestInfo* info = - ResourceDispatcherHost::InfoForRequest(request); - info->set_filter_policy(filter_policy); - request->Start(); - } - request_has_been_notified_ = true; - - // We're done with this object on the IO thread. - Release(); -} - void SSLErrorHandler::CompleteTakeNoAction() { DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); |
