diff options
author | kkanetkar@chromium.org <kkanetkar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-27 01:36:43 +0000 |
---|---|---|
committer | kkanetkar@chromium.org <kkanetkar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-27 01:36:43 +0000 |
commit | 042ecea347c6984c3263671f45ebec79e9fbb26f (patch) | |
tree | bfedface274ededad945b9c7d7871a19941d56ee /chrome/browser/appcache | |
parent | 43929df205159d29c8e968e93c8572b05c92de17 (diff) | |
download | chromium_src-042ecea347c6984c3263671f45ebec79e9fbb26f.zip chromium_src-042ecea347c6984c3263671f45ebec79e9fbb26f.tar.gz chromium_src-042ecea347c6984c3263671f45ebec79e9fbb26f.tar.bz2 |
A basic implementation of information about appcache. Lists manifest files, time and size information.
BUG=38463
TEST=Run chrome, navigate to about:appcache-internals.
Review URL: http://codereview.chromium.org/1109009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/appcache')
-rw-r--r-- | chrome/browser/appcache/view_appcache_internals_job_factory.cc | 28 | ||||
-rw-r--r-- | chrome/browser/appcache/view_appcache_internals_job_factory.h | 19 |
2 files changed, 47 insertions, 0 deletions
diff --git a/chrome/browser/appcache/view_appcache_internals_job_factory.cc b/chrome/browser/appcache/view_appcache_internals_job_factory.cc new file mode 100644 index 0000000..3f908af --- /dev/null +++ b/chrome/browser/appcache/view_appcache_internals_job_factory.cc @@ -0,0 +1,28 @@ +// 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. + +#include "chrome/browser/appcache/view_appcache_internals_job_factory.h" + +#include "chrome/browser/net/chrome_url_request_context.h" +#include "chrome/common/url_constants.h" +#include "webkit/appcache/appcache_service.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. +URLRequestJob* ViewAppCacheInternalsJobFactory::CreateJobForRequest( + URLRequest* request) { + URLRequestContext* context = request->context(); + ChromeURLRequestContext* chrome_request_context = + reinterpret_cast<ChromeURLRequestContext*>(context); + return new appcache::ViewAppCacheInternalsJob( + request, chrome_request_context->appcache_service()); +} + diff --git a/chrome/browser/appcache/view_appcache_internals_job_factory.h b/chrome/browser/appcache/view_appcache_internals_job_factory.h new file mode 100644 index 0000000..50ee303 --- /dev/null +++ b/chrome/browser/appcache/view_appcache_internals_job_factory.h @@ -0,0 +1,19 @@ +// 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. + +#ifndef CHROME_BROWSER_APPCACHE_VIEW_APPCACHE_INTERNALS_JOB_FACTORY_H_ +#define CHROME_BROWSER_APPCACHE_VIEW_APPCACHE_INTERNALS_JOB_FACTORY_H_ + +class GURL; +class URLRequest; +class URLRequestJob; + +class ViewAppCacheInternalsJobFactory { + public: + static bool IsSupportedURL(const GURL& url); + static URLRequestJob* CreateJobForRequest(URLRequest* request); +}; + +#endif // CHROME_BROWSER_APPCACHE_VIEW_APPCACHE_INTERNALS_JOB_FACTORY_H_ + |