diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-11 19:07:18 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-11 19:07:18 +0000 |
commit | 0ae8c214069fc8668669edcf4aa1bcb16ebe8205 (patch) | |
tree | de94dd3f9f7d0992d46318008e23d41d8676b74d | |
parent | 4ba55b31a8ed4528173d33737125680c6f110b52 (diff) | |
download | chromium_src-0ae8c214069fc8668669edcf4aa1bcb16ebe8205.zip chromium_src-0ae8c214069fc8668669edcf4aa1bcb16ebe8205.tar.gz chromium_src-0ae8c214069fc8668669edcf4aa1bcb16ebe8205.tar.bz2 |
Get rid of another dependency on /chrome.
Review URL: http://codereview.chromium.org/7002017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85009 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/webui/chrome_url_data_manager_backend.cc | 12 | ||||
-rw-r--r-- | content/browser/appcache/OWNERS | 1 | ||||
-rw-r--r-- | content/browser/appcache/view_appcache_internals_job_factory.cc | 25 | ||||
-rw-r--r-- | content/browser/appcache/view_appcache_internals_job_factory.h | 24 | ||||
-rw-r--r-- | content/content_browser.gypi | 2 |
5 files changed, 10 insertions, 54 deletions
diff --git a/chrome/browser/ui/webui/chrome_url_data_manager_backend.cc b/chrome/browser/ui/webui/chrome_url_data_manager_backend.cc index f631c5e..7578aa0 100644 --- a/chrome/browser/ui/webui/chrome_url_data_manager_backend.cc +++ b/chrome/browser/ui/webui/chrome_url_data_manager_backend.cc @@ -18,7 +18,6 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/url_constants.h" -#include "content/browser/appcache/view_appcache_internals_job_factory.h" #include "content/browser/browser_thread.h" #include "googleurl/src/url_util.h" #include "grit/platform_locale_settings.h" @@ -28,6 +27,7 @@ #include "net/url_request/url_request.h" #include "net/url_request/url_request_file_job.h" #include "net/url_request/url_request_job.h" +#include "webkit/appcache/view_appcache_internals_job.h" namespace { @@ -62,6 +62,12 @@ void URLToRequest(const GURL& url, std::string* source_name, path->assign(spec.substr(offset)); } +bool IsViewAppCacheInternalsURL(const GURL& url) { + return StartsWithASCII(url.spec(), + chrome::kAppCacheViewInternalsURL, + true /*case_sensitive*/); +} + } // namespace // URLRequestChromeJob is a net::URLRequestJob that manages running @@ -274,8 +280,8 @@ net::URLRequestJob* ChromeURLDataManagerBackend::Factory( return ViewHttpCacheJobFactory::CreateJobForRequest(request); // Next check for chrome://appcache-internals/, which uses its own job type. - if (ViewAppCacheInternalsJobFactory::IsSupportedURL(request->url())) - return ViewAppCacheInternalsJobFactory::CreateJobForRequest( + if (IsViewAppCacheInternalsURL(request->url())) + return new appcache::ViewAppCacheInternalsJob( request, chrome_request_context->appcache_service()); // Next check for chrome://blob-internals/, which uses its own job type. diff --git a/content/browser/appcache/OWNERS b/content/browser/appcache/OWNERS new file mode 100644 index 0000000..3723f40 --- /dev/null +++ b/content/browser/appcache/OWNERS @@ -0,0 +1 @@ +michaeln@chromium.org diff --git a/content/browser/appcache/view_appcache_internals_job_factory.cc b/content/browser/appcache/view_appcache_internals_job_factory.cc deleted file mode 100644 index a797672..0000000 --- a/content/browser/appcache/view_appcache_internals_job_factory.cc +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2011 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. - -#include "content/browser/appcache/view_appcache_internals_job_factory.h" - -#include "base/string_util.h" -#include "chrome/common/url_constants.h" -#include "content/browser/appcache/chrome_appcache_service.h" -#include "net/url_request/url_request.h" -#include "webkit/appcache/view_appcache_internals_job.h" - -// static. -bool ViewAppCacheInternalsJobFactory::IsSupportedURL(const GURL& url) { - return StartsWithASCII(url.spec(), - chrome::kAppCacheViewInternalsURL, - true /*case_sensitive*/); -} - -// static. -net::URLRequestJob* ViewAppCacheInternalsJobFactory::CreateJobForRequest( - net::URLRequest* request, ChromeAppCacheService* appcache_service) { - return new appcache::ViewAppCacheInternalsJob( - request, appcache_service); -} diff --git a/content/browser/appcache/view_appcache_internals_job_factory.h b/content/browser/appcache/view_appcache_internals_job_factory.h deleted file mode 100644 index 4b093c8..0000000 --- a/content/browser/appcache/view_appcache_internals_job_factory.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2011 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. - -#ifndef CONTENT_BROWSER_APPCACHE_VIEW_APPCACHE_INTERNALS_JOB_FACTORY_H_ -#define CONTENT_BROWSER_APPCACHE_VIEW_APPCACHE_INTERNALS_JOB_FACTORY_H_ -#pragma once - -class ChromeAppCacheService; -class GURL; -namespace net { -class URLRequest; -class URLRequestJob; -} // namespace net - -class ViewAppCacheInternalsJobFactory { - public: - static bool IsSupportedURL(const GURL& url); - static net::URLRequestJob* CreateJobForRequest( - net::URLRequest* request, - ChromeAppCacheService* appcache_service); -}; - -#endif // CONTENT_BROWSER_APPCACHE_VIEW_APPCACHE_INTERNALS_JOB_FACTORY_H_ diff --git a/content/content_browser.gypi b/content/content_browser.gypi index 613b4a7..79c0c63 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi @@ -28,8 +28,6 @@ 'browser/appcache/appcache_frontend_proxy.h', 'browser/appcache/chrome_appcache_service.cc', 'browser/appcache/chrome_appcache_service.h', - 'browser/appcache/view_appcache_internals_job_factory.cc', - 'browser/appcache/view_appcache_internals_job_factory.h', 'browser/browser_child_process_host.cc', 'browser/browser_child_process_host.h', 'browser/browser_message_filter.cc', |