From 052c92700b2c71e60ab89e765467b9b0926d0f7c Mon Sep 17 00:00:00 2001 From: "hclam@chromium.org" Date: Fri, 25 Jun 2010 07:25:52 +0000 Subject: Revert "Revert "Show extension icons next to their top-level context menu items."" This reverts r50828 as the error is already suppressed r50793. TBR=asargent Review URL: http://codereview.chromium.org/2844028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50831 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/extensions/extension_protocols.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'chrome/browser/extensions/extension_protocols.cc') diff --git a/chrome/browser/extensions/extension_protocols.cc b/chrome/browser/extensions/extension_protocols.cc index 0a868f4..83ef404 100644 --- a/chrome/browser/extensions/extension_protocols.cc +++ b/chrome/browser/extensions/extension_protocols.cc @@ -85,9 +85,10 @@ static URLRequestJob* CreateExtensionURLRequestJob(URLRequest* request, return new URLRequestErrorJob(request, net::ERR_ADDRESS_UNREACHABLE); // chrome-extension://extension-id/resource/path.js - FilePath directory_path = context->GetPathForExtension(request->url().host()); + const std::string& extension_id = request->url().host(); + FilePath directory_path = context->GetPathForExtension(extension_id); if (directory_path.value().empty()) { - LOG(WARNING) << "Failed to GetPathForExtension: " << request->url().host(); + LOG(WARNING) << "Failed to GetPathForExtension: " << extension_id; return NULL; } @@ -117,7 +118,7 @@ static URLRequestJob* CreateExtensionURLRequestJob(URLRequest* request, } // TODO(tc): Move all of these files into resources.pak so we don't break // when updating on Linux. - ExtensionResource resource(directory_path, + ExtensionResource resource(extension_id, directory_path, extension_file_util::ExtensionURLToRelativeFilePath(request->url())); return new URLRequestFileJob(request, @@ -134,7 +135,7 @@ static URLRequestJob* CreateUserScriptURLRequestJob(URLRequest* request, // chrome-user-script:/user-script-name.user.js FilePath directory_path = context->user_script_dir_path(); - ExtensionResource resource(directory_path, + ExtensionResource resource(request->url().host(), directory_path, extension_file_util::ExtensionURLToRelativeFilePath(request->url())); return new URLRequestFileJob(request, resource.GetFilePath()); -- cgit v1.1