summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 20:17:39 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 20:17:39 +0000
commitcbe89c9bfb51c1bf577584d32df5d8b7a3c83159 (patch)
tree354e107d246dab86da1aca3f79ef11a9b318ea9e /chrome/common
parent59c4dd56e427e29eb26e81512c3066fe3f8b13b8 (diff)
downloadchromium_src-cbe89c9bfb51c1bf577584d32df5d8b7a3c83159.zip
chromium_src-cbe89c9bfb51c1bf577584d32df5d8b7a3c83159.tar.gz
chromium_src-cbe89c9bfb51c1bf577584d32df5d8b7a3c83159.tar.bz2
Get rid of the extension dependency in ResourceDispatcher by calling out to a webkit_glue function that can update the peer. No point sending the boolean flag from the browser since the same check is done in the renderer.
Review URL: http://codereview.chromium.org/6628006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76957 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/render_messages.cc4
-rw-r--r--chrome/common/resource_dispatcher.cc13
-rw-r--r--chrome/common/resource_response.cc3
-rw-r--r--chrome/common/resource_response.h5
4 files changed, 6 insertions, 19 deletions
diff --git a/chrome/common/render_messages.cc b/chrome/common/render_messages.cc
index 300106a..3d1f767 100644
--- a/chrome/common/render_messages.cc
+++ b/chrome/common/render_messages.cc
@@ -516,7 +516,6 @@ void ParamTraits<webkit_glue::ResourceResponseInfo>::Log(
void ParamTraits<ResourceResponseHead>::Write(Message* m, const param_type& p) {
ParamTraits<webkit_glue::ResourceResponseInfo>::Write(m, p);
WriteParam(m, p.status);
- WriteParam(m, p.replace_extension_localization_templates);
}
bool ParamTraits<ResourceResponseHead>::Read(const Message* m,
@@ -524,8 +523,7 @@ bool ParamTraits<ResourceResponseHead>::Read(const Message* m,
param_type* r) {
return ParamTraits<webkit_glue::ResourceResponseInfo>::Read(
m, iter, r) &&
- ReadParam(m, iter, &r->status) &&
- ReadParam(m, iter, &r->replace_extension_localization_templates);
+ ReadParam(m, iter, &r->status);
}
void ParamTraits<ResourceResponseHead>::Log(const param_type& p,
diff --git a/chrome/common/resource_dispatcher.cc b/chrome/common/resource_dispatcher.cc
index b179b45..18d0f68 100644
--- a/chrome/common/resource_dispatcher.cc
+++ b/chrome/common/resource_dispatcher.cc
@@ -12,7 +12,6 @@
#include "base/message_loop.h"
#include "base/shared_memory.h"
#include "base/string_util.h"
-#include "chrome/common/extensions/extension_localization_peer.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/render_messages_params.h"
#include "chrome/common/resource_response.h"
@@ -327,14 +326,10 @@ void ResourceDispatcher::OnReceivedResponse(
if (!request_info)
return;
- if (response_head.replace_extension_localization_templates) {
- webkit_glue::ResourceLoaderBridge::Peer* new_peer =
- ExtensionLocalizationPeer::CreateExtensionLocalizationPeer(
- request_info->peer, message_sender(), response_head.mime_type,
- request_info->url);
- if (new_peer)
- request_info->peer = new_peer;
- }
+ webkit_glue::ResourceLoaderBridge::Peer* new_peer = webkit_glue::ReplacePeer(
+ request_info->peer, response_head.mime_type, request_info->url);
+ if (new_peer)
+ request_info->peer = new_peer;
request_info->peer->OnReceivedResponse(response_head);
}
diff --git a/chrome/common/resource_response.cc b/chrome/common/resource_response.cc
index ad8f184..ab4bdfe 100644
--- a/chrome/common/resource_response.cc
+++ b/chrome/common/resource_response.cc
@@ -4,8 +4,7 @@
#include "chrome/common/resource_response.h"
-ResourceResponseHead::ResourceResponseHead()
- : replace_extension_localization_templates(false) {
+ResourceResponseHead::ResourceResponseHead() {
}
ResourceResponseHead::~ResourceResponseHead() {}
diff --git a/chrome/common/resource_response.h b/chrome/common/resource_response.h
index a5284df..c9cbada 100644
--- a/chrome/common/resource_response.h
+++ b/chrome/common/resource_response.h
@@ -22,11 +22,6 @@ struct ResourceResponseHead : webkit_glue::ResourceResponseInfo {
// The response status.
net::URLRequestStatus status;
-
- // 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;
};
// Parameters for a synchronous resource response.