diff options
Diffstat (limited to 'webkit/appcache/view_appcache_internals_job.h')
-rw-r--r-- | webkit/appcache/view_appcache_internals_job.h | 49 |
1 files changed, 10 insertions, 39 deletions
diff --git a/webkit/appcache/view_appcache_internals_job.h b/webkit/appcache/view_appcache_internals_job.h index 8995713..2d45c51 100644 --- a/webkit/appcache/view_appcache_internals_job.h +++ b/webkit/appcache/view_appcache_internals_job.h @@ -1,57 +1,28 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// 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 WEBKIT_APPCACHE_VIEW_APPCACHE_INTERNALS_JOB_H_ #define WEBKIT_APPCACHE_VIEW_APPCACHE_INTERNALS_JOB_H_ -#include <string> - -#include "net/url_request/url_request_simple_job.h" -#include "webkit/appcache/appcache_service.h" +#include "base/basictypes.h" namespace net { class URLRequest; -} // namespace net +class URLRequestJob; +} namespace appcache { -// A job subclass that implements a protocol to inspect the internal -// state of appcache service. -class ViewAppCacheInternalsJob : public net::URLRequestSimpleJob { - public: - // Stores handle to appcache service for getting information. - ViewAppCacheInternalsJob(net::URLRequest* request, AppCacheService* service); - - // Fetches the AppCache Info and calls StartAsync after it is done. - virtual void Start(); +class AppCacheService; - virtual bool GetData(std::string* mime_type, - std::string* charset, - std::string* data) const; - - // Overridden method from net::URLRequestJob. - virtual bool IsRedirectResponse(GURL* location, int* http_status_code); +class ViewAppCacheInternalsJobFactory { + public: + static net::URLRequestJob* CreateJobForRequest( + net::URLRequest* request, AppCacheService* service); private: - virtual ~ViewAppCacheInternalsJob(); - - void AppCacheDone(int rv); - - // Adds HTML from appcache information to out. - void GenerateHTMLAppCacheInfo(std::string* out) const; - void GetAppCacheInfoAsync(); - void RemoveAppCacheInfoAsync(const std::string& manifest_url_spec); - - // This is a common callback for both remove and getinfo for appcache. - scoped_refptr<net::CancelableCompletionCallback<ViewAppCacheInternalsJob> > - appcache_done_callback_; - - scoped_refptr<AppCacheInfoCollection> info_collection_; - // Not owned. - AppCacheService* appcache_service_; - - DISALLOW_COPY_AND_ASSIGN(ViewAppCacheInternalsJob); + DISALLOW_IMPLICIT_CONSTRUCTORS(ViewAppCacheInternalsJobFactory); }; } // namespace appcache |