summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-18 18:38:09 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-18 18:38:09 +0000
commit8a58f9a5e0b7e62d38ceef9c6a3b691a8593e7d9 (patch)
tree36f7876f1b49e7edf492198c79a587090e7e6233 /chrome/browser
parent6e42e7275a6eb6d374e74367aa6c55c1df36568a (diff)
downloadchromium_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')
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.cc27
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.h18
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host_request_info.cc4
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host_request_info.h20
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc48
-rw-r--r--chrome/browser/renderer_host/resource_request_details.h5
-rw-r--r--chrome/browser/renderer_host/sync_resource_handler.cc3
-rw-r--r--chrome/browser/ssl/ssl_error_handler.cc44
-rw-r--r--chrome/browser/ssl/ssl_error_handler.h19
-rw-r--r--chrome/browser/ssl/ssl_manager.cc6
-rw-r--r--chrome/browser/ssl/ssl_policy.h1
-rw-r--r--chrome/browser/ssl/ssl_request_info.h7
12 files changed, 58 insertions, 144 deletions
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc
index 2301720..17bdf4e 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc
@@ -150,14 +150,15 @@ bool ShouldServiceRequest(ChildProcessInfo::ProcessType process_type,
}
void PopulateResourceResponse(URLRequest* request,
- FilterPolicy::Type filter_policy,
+ bool replace_extension_localization_templates,
ResourceResponse* response) {
response->response_head.status = request->status();
response->response_head.request_time = request->request_time();
response->response_head.response_time = request->response_time();
response->response_head.headers = request->response_headers();
request->GetCharset(&response->response_head.charset);
- response->response_head.filter_policy = filter_policy;
+ response->response_head.replace_extension_localization_templates =
+ replace_extension_localization_templates;
response->response_head.content_length = request->GetExpectedContentSize();
request->GetMimeType(&response->response_head.mime_type);
response->response_head.was_fetched_via_spdy =
@@ -465,9 +466,8 @@ void ResourceDispatcherHost::BeginRequest(
ResourceType::IsFrame(request_data.resource_type), // allow_download
request_data.host_renderer_id,
request_data.host_render_view_id);
- ApplyExtensionMessageFilterPolicy(request_data.url,
- request_data.resource_type,
- extra_info);
+ ApplyExtensionLocalizationFilter(request_data.url, request_data.resource_type,
+ extra_info);
SetRequestInfo(request, extra_info); // Request takes ownership.
chrome_browser_net::SetOriginProcessUniqueIDForRequest(
request_data.origin_child_id, request);
@@ -934,7 +934,8 @@ void ResourceDispatcherHost::OnReceivedRedirect(URLRequest* request,
}
scoped_refptr<ResourceResponse> response = new ResourceResponse;
- PopulateResourceResponse(request, info->filter_policy(), response);
+ PopulateResourceResponse(request,
+ info->replace_extension_localization_templates(), response);
if (!info->resource_handler()->OnRequestRedirected(info->request_id(),
new_url,
response, defer_redirect))
@@ -1031,7 +1032,8 @@ bool ResourceDispatcherHost::CompleteResponseStarted(URLRequest* request) {
ResourceDispatcherHostRequestInfo* info = InfoForRequest(request);
scoped_refptr<ResourceResponse> response = new ResourceResponse;
- PopulateResourceResponse(request, info->filter_policy(), response);
+ PopulateResourceResponse(request,
+ info->replace_extension_localization_templates(), response);
if (request->ssl_info().cert) {
int cert_id =
@@ -1757,17 +1759,14 @@ bool ResourceDispatcherHost::IsResourceDispatcherHostMessage(
}
// static
-void ResourceDispatcherHost::ApplyExtensionMessageFilterPolicy(
+void ResourceDispatcherHost::ApplyExtensionLocalizationFilter(
const GURL& url,
const ResourceType::Type& resource_type,
ResourceDispatcherHostRequestInfo* request_info) {
- // Apply filter only to chrome extension css files that don't have
- // security filter already set.
+ // Apply filter to chrome extension CSS files.
if (url.SchemeIs(chrome::kExtensionScheme) &&
- request_info->filter_policy() == FilterPolicy::DONT_FILTER &&
- resource_type == ResourceType::STYLESHEET) {
- request_info->set_filter_policy(FilterPolicy::FILTER_EXTENSION_MESSAGES);
- }
+ resource_type == ResourceType::STYLESHEET)
+ request_info->set_replace_extension_localization_templates();
}
// static
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.h b/chrome/browser/renderer_host/resource_dispatcher_host.h
index 79bf277..bce21e8 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.h
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.h
@@ -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.
@@ -274,14 +274,10 @@ class ResourceDispatcherHost : public URLRequest::Delegate {
IncrementOutstandingRequestsMemoryCost);
FRIEND_TEST(ResourceDispatcherHostTest,
CalculateApproximateMemoryCost);
- FRIEND_TEST(ApplyExtensionMessageFilterPolicyTest, WrongScheme);
- FRIEND_TEST(ApplyExtensionMessageFilterPolicyTest, GoodScheme);
- FRIEND_TEST(ApplyExtensionMessageFilterPolicyTest,
- GoodSchemeWithSecurityFilter);
- FRIEND_TEST(ApplyExtensionMessageFilterPolicyTest,
+ FRIEND_TEST(ApplyExtensionLocalizationFilterTest, WrongScheme);
+ FRIEND_TEST(ApplyExtensionLocalizationFilterTest, GoodScheme);
+ FRIEND_TEST(ApplyExtensionLocalizationFilterTest,
GoodSchemeWrongResourceType);
- FRIEND_TEST(ApplyExtensionMessageFilterPolicyTest,
- WrongSchemeResourceAndFilter);
class ShutdownTask;
@@ -408,9 +404,9 @@ class ResourceDispatcherHost : public URLRequest::Delegate {
// Returns true if the message passed in is a resource related message.
static bool IsResourceDispatcherHostMessage(const IPC::Message&);
- // Applies FilterPolicy::FILTER_EXTENSION_MESSAGES to all text/css requests
- // that have "chrome-extension://" scheme.
- static void ApplyExtensionMessageFilterPolicy(
+ // Sets replace_extension_localization_templates on all text/css requests that
+ // have "chrome-extension://" scheme.
+ static void ApplyExtensionLocalizationFilter(
const GURL& url,
const ResourceType::Type& resource_type,
ResourceDispatcherHostRequestInfo* request_info);
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host_request_info.cc b/chrome/browser/renderer_host/resource_dispatcher_host_request_info.cc
index 23ba684..67c8c96 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host_request_info.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host_request_info.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.
@@ -35,7 +35,7 @@ ResourceDispatcherHostRequestInfo::ResourceDispatcherHostRequestInfo(
frame_origin_(frame_origin),
main_frame_origin_(main_frame_origin),
resource_type_(resource_type),
- filter_policy_(FilterPolicy::DONT_FILTER),
+ replace_extension_localization_templates_(false),
last_load_state_(net::LOAD_STATE_IDLE),
upload_size_(upload_size),
last_upload_position_(0),
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host_request_info.h b/chrome/browser/renderer_host/resource_dispatcher_host_request_info.h
index affd32d..4630568 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host_request_info.h
+++ b/chrome/browser/renderer_host/resource_dispatcher_host_request_info.h
@@ -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.
@@ -10,7 +10,6 @@
#include "base/basictypes.h"
#include "base/time.h"
#include "chrome/common/child_process_info.h"
-#include "chrome/common/filter_policy.h"
#include "net/base/load_states.h"
#include "net/url_request/url_request.h"
#include "webkit/glue/resource_type.h"
@@ -115,12 +114,15 @@ class ResourceDispatcherHostRequestInfo : public URLRequest::UserData {
// Identifies the type of resource, such as subframe, media, etc.
ResourceType::Type resource_type() const { return resource_type_; }
- // Whether the content for this request should be filtered (on the renderer
- // side) to make it more secure: images are stamped, frame content is
- // replaced with an error message and all other resources are entirely
- // filtered out.
- FilterPolicy::Type filter_policy() const { return filter_policy_; }
- void set_filter_policy(FilterPolicy::Type policy) { filter_policy_ = policy; }
+ // Whether we should apply a filter to this resource that replaces
+ // localization templates with the appropriate localized strings. This is set
+ // for CSS resources used by extensions.
+ bool replace_extension_localization_templates() const {
+ return replace_extension_localization_templates_;
+ }
+ void set_replace_extension_localization_templates() {
+ replace_extension_localization_templates_ = true;
+ }
// Returns the last updated state of the load. This is updated periodically
// by the ResourceDispatcherHost and tracked here so we don't send out
@@ -209,7 +211,7 @@ class ResourceDispatcherHostRequestInfo : public URLRequest::UserData {
std::string frame_origin_;
std::string main_frame_origin_;
ResourceType::Type resource_type_;
- FilterPolicy::Type filter_policy_;
+ bool replace_extension_localization_templates_;
net::LoadState last_load_state_;
uint64 upload_size_;
uint64 last_upload_position_;
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc b/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc
index ef133b2..2af376e 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 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.
@@ -984,7 +984,7 @@ class DummyResourceHandler : public ResourceHandler {
DISALLOW_COPY_AND_ASSIGN(DummyResourceHandler);
};
-class ApplyExtensionMessageFilterPolicyTest : public testing::Test {
+class ApplyExtensionLocalizationFilterTest : public testing::Test {
protected:
void SetUp() {
url_.reset(new GURL(
@@ -1007,45 +1007,25 @@ class ApplyExtensionMessageFilterPolicyTest : public testing::Test {
scoped_ptr<ResourceDispatcherHostRequestInfo> request_info_;
};
-TEST_F(ApplyExtensionMessageFilterPolicyTest, WrongScheme) {
+TEST_F(ApplyExtensionLocalizationFilterTest, WrongScheme) {
url_.reset(new GURL("html://behllobkkfkfnphdnhnkndlbkcpglgmj/popup.html"));
- ResourceDispatcherHost::ApplyExtensionMessageFilterPolicy(
- *url_, resource_type_, request_info_.get());
+ ResourceDispatcherHost::ApplyExtensionLocalizationFilter(*url_,
+ resource_type_, request_info_.get());
- EXPECT_EQ(FilterPolicy::DONT_FILTER, request_info_->filter_policy());
+ EXPECT_FALSE(request_info_->replace_extension_localization_templates());
}
-TEST_F(ApplyExtensionMessageFilterPolicyTest, GoodScheme) {
- ResourceDispatcherHost::ApplyExtensionMessageFilterPolicy(
- *url_, resource_type_, request_info_.get());
+TEST_F(ApplyExtensionLocalizationFilterTest, GoodScheme) {
+ ResourceDispatcherHost::ApplyExtensionLocalizationFilter(*url_,
+ resource_type_, request_info_.get());
- EXPECT_EQ(FilterPolicy::FILTER_EXTENSION_MESSAGES,
- request_info_->filter_policy());
+ EXPECT_TRUE(request_info_->replace_extension_localization_templates());
}
-TEST_F(ApplyExtensionMessageFilterPolicyTest, GoodSchemeWithSecurityFilter) {
- request_info_->set_filter_policy(FilterPolicy::FILTER_ALL_EXCEPT_IMAGES);
- ResourceDispatcherHost::ApplyExtensionMessageFilterPolicy(
- *url_, resource_type_, request_info_.get());
-
- EXPECT_EQ(FilterPolicy::FILTER_ALL_EXCEPT_IMAGES,
- request_info_->filter_policy());
-}
-
-TEST_F(ApplyExtensionMessageFilterPolicyTest, GoodSchemeWrongResourceType) {
+TEST_F(ApplyExtensionLocalizationFilterTest, GoodSchemeWrongResourceType) {
resource_type_ = ResourceType::MAIN_FRAME;
- ResourceDispatcherHost::ApplyExtensionMessageFilterPolicy(
- *url_, resource_type_, request_info_.get());
-
- EXPECT_EQ(FilterPolicy::DONT_FILTER, request_info_->filter_policy());
-}
-
-TEST_F(ApplyExtensionMessageFilterPolicyTest, WrongSchemeResourceAndFilter) {
- url_.reset(new GURL("html://behllobkkfkfnphdnhnkndlbkcpglgmj/popup.html"));
- resource_type_ = ResourceType::MEDIA;
- request_info_->set_filter_policy(FilterPolicy::FILTER_ALL);
- ResourceDispatcherHost::ApplyExtensionMessageFilterPolicy(
- *url_, resource_type_, request_info_.get());
+ ResourceDispatcherHost::ApplyExtensionLocalizationFilter(*url_,
+ resource_type_, request_info_.get());
- EXPECT_EQ(FilterPolicy::FILTER_ALL, request_info_->filter_policy());
+ EXPECT_FALSE(request_info_->replace_extension_localization_templates());
}
diff --git a/chrome/browser/renderer_host/resource_request_details.h b/chrome/browser/renderer_host/resource_request_details.h
index 600decd..5310b5b 100644
--- a/chrome/browser/renderer_host/resource_request_details.h
+++ b/chrome/browser/renderer_host/resource_request_details.h
@@ -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.
@@ -39,7 +39,6 @@ class ResourceRequestDetails {
resource_type_ = info->resource_type();
frame_origin_ = info->frame_origin();
main_frame_origin_ = info->main_frame_origin();
- filter_policy_ = info->filter_policy();
// If request is from the worker process on behalf of a renderer, use
// the renderer process id, since it consumes the notification response
@@ -75,7 +74,6 @@ class ResourceRequestDetails {
int ssl_cert_id() const { return ssl_cert_id_; }
int ssl_cert_status() const { return ssl_cert_status_; }
ResourceType::Type resource_type() const { return resource_type_; }
- FilterPolicy::Type filter_policy() const { return filter_policy_; }
private:
GURL url_;
@@ -91,7 +89,6 @@ class ResourceRequestDetails {
int ssl_cert_id_;
int ssl_cert_status_;
ResourceType::Type resource_type_;
- FilterPolicy::Type filter_policy_;
};
// Details about a redirection of a resource request.
diff --git a/chrome/browser/renderer_host/sync_resource_handler.cc b/chrome/browser/renderer_host/sync_resource_handler.cc
index 11d776b..9674648 100644
--- a/chrome/browser/renderer_host/sync_resource_handler.cc
+++ b/chrome/browser/renderer_host/sync_resource_handler.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 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.
@@ -14,7 +14,6 @@ SyncResourceHandler::SyncResourceHandler(
receiver_(receiver),
result_message_(result_message) {
result_.final_url = url;
- result_.filter_policy = FilterPolicy::DONT_FILTER;
}
SyncResourceHandler::~SyncResourceHandler() {
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));
diff --git a/chrome/browser/ssl/ssl_error_handler.h b/chrome/browser/ssl/ssl_error_handler.h
index 2589f5d..5fcc4f4 100644
--- a/chrome/browser/ssl/ssl_error_handler.h
+++ b/chrome/browser/ssl/ssl_error_handler.h
@@ -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.
@@ -11,7 +11,6 @@
#include "base/ref_counted.h"
#include "chrome/browser/renderer_host/global_request_id.h"
#include "chrome/browser/ssl/ssl_manager.h"
-#include "chrome/common/filter_policy.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/resource_type.h"
@@ -25,8 +24,8 @@ class URLRequest;
// UI thread. Subclasses should override the OnDispatched/OnDispatchFailed
// methods to implement the actions that should be taken on the UI thread.
// These methods can call the different convenience methods ContinueRequest/
-// CancelRequest/StartRequest to perform any required action on the URLRequest
-// the ErrorHandler was created with.
+// CancelRequest to perform any required action on the URLRequest the
+// ErrorHandler was created with.
//
// IMPORTANT NOTE:
//
@@ -77,14 +76,6 @@ class SSLErrorHandler : public base::RefCountedThreadSafe<SSLErrorHandler> {
// This method can be called from OnDispatchFailed and OnDispatched.
void DenyRequest();
- // Starts the associated URLRequest. |filter_policy| specifies whether the
- // ResourceDispatcher should attempt to filter the loaded content in order
- // to make it secure (ex: images are made slightly transparent and are
- // stamped).
- // Should only be called when the URLRequest has not already been started.
- // This method can be called from OnDispatchFailed and OnDispatched.
- void StartRequest(FilterPolicy::Type filter_policy);
-
// Does nothing on the URLRequest but ensures the current instance ref
// count is decremented appropriately. Subclasses that do not want to
// take any specific actions in their OnDispatched/OnDispatchFailed should
@@ -129,10 +120,6 @@ class SSLErrorHandler : public base::RefCountedThreadSafe<SSLErrorHandler> {
// Call on the IO thread.
void CompleteContinueRequest();
- // Completes the StartRequest operation on the IO thread.
- // Call on the IO thread.
- void CompleteStartRequest(FilterPolicy::Type filter_policy);
-
// Derefs this instance.
// Call on the IO thread.
void CompleteTakeNoAction();
diff --git a/chrome/browser/ssl/ssl_manager.cc b/chrome/browser/ssl/ssl_manager.cc
index 333d8b2..dbff09e 100644
--- a/chrome/browser/ssl/ssl_manager.cc
+++ b/chrome/browser/ssl/ssl_manager.cc
@@ -202,14 +202,13 @@ void SSLManager::DidLoadFromMemoryCache(LoadFromMemoryCacheDetails* details) {
// Simulate loading this resource through the usual path.
// Note that we specify SUB_RESOURCE as the resource type as WebCore only
// caches sub-resources.
- // This resource must have been loaded with FilterPolicy::DONT_FILTER because
- // filtered resouces aren't cachable.
+ // This resource must have been loaded with no filtering because filtered
+ // resouces aren't cachable.
scoped_refptr<SSLRequestInfo> info = new SSLRequestInfo(
details->url(),
ResourceType::SUB_RESOURCE,
details->frame_origin(),
details->main_frame_origin(),
- FilterPolicy::DONT_FILTER,
details->pid(),
details->ssl_cert_id(),
details->ssl_cert_status());
@@ -238,7 +237,6 @@ void SSLManager::DidStartResourceResponse(ResourceRequestDetails* details) {
details->resource_type(),
details->frame_origin(),
details->main_frame_origin(),
- details->filter_policy(),
details->origin_child_id(),
details->ssl_cert_id(),
details->ssl_cert_status());
diff --git a/chrome/browser/ssl/ssl_policy.h b/chrome/browser/ssl/ssl_policy.h
index 8c8a5f8..1f1766b 100644
--- a/chrome/browser/ssl/ssl_policy.h
+++ b/chrome/browser/ssl/ssl_policy.h
@@ -8,7 +8,6 @@
#include <string>
#include "chrome/browser/ssl/ssl_blocking_page.h"
-#include "chrome/common/filter_policy.h"
#include "webkit/glue/resource_type.h"
class NavigationEntry;
diff --git a/chrome/browser/ssl/ssl_request_info.h b/chrome/browser/ssl/ssl_request_info.h
index 8964490..c495cd2 100644
--- a/chrome/browser/ssl/ssl_request_info.h
+++ b/chrome/browser/ssl/ssl_request_info.h
@@ -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.
@@ -7,7 +7,6 @@
#include <string>
-#include "chrome/common/filter_policy.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/resource_type.h"
@@ -20,7 +19,6 @@ class SSLRequestInfo : public base::RefCounted<SSLRequestInfo> {
ResourceType::Type resource_type,
const std::string& frame_origin,
const std::string& main_frame_origin,
- FilterPolicy::Type filter_policy,
int child_id,
int ssl_cert_id,
int ssl_cert_status)
@@ -28,7 +26,6 @@ class SSLRequestInfo : public base::RefCounted<SSLRequestInfo> {
resource_type_(resource_type),
frame_origin_(frame_origin),
main_frame_origin_(main_frame_origin),
- filter_policy_(filter_policy),
child_id_(child_id),
ssl_cert_id_(ssl_cert_id),
ssl_cert_status_(ssl_cert_status) {
@@ -38,7 +35,6 @@ class SSLRequestInfo : public base::RefCounted<SSLRequestInfo> {
ResourceType::Type resource_type() const { return resource_type_; }
const std::string& frame_origin() const { return frame_origin_; }
const std::string& main_frame_origin() const { return main_frame_origin_; }
- FilterPolicy::Type filter_policy() const { return filter_policy_; }
int child_id() const { return child_id_; }
int ssl_cert_id() const { return ssl_cert_id_; }
int ssl_cert_status() const { return ssl_cert_status_; }
@@ -52,7 +48,6 @@ class SSLRequestInfo : public base::RefCounted<SSLRequestInfo> {
ResourceType::Type resource_type_;
std::string frame_origin_;
std::string main_frame_origin_;
- FilterPolicy::Type filter_policy_;
int child_id_;
int ssl_cert_id_;
int ssl_cert_status_;