Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2876)

Unified Diff: webkit/appcache/appcache_interfaces.h

Issue 3009005: Chrome side of changes required to populate appcache resource list.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/appcache/appcache_interfaces.h
===================================================================
--- webkit/appcache/appcache_interfaces.h (revision 53710)
+++ webkit/appcache/appcache_interfaces.h (working copy)
@@ -9,8 +9,9 @@
#include <vector>
#include "base/basictypes.h"
#include "base/file_path.h"
+#include "base/time.h"
+#include "googleurl/src/gurl.h"
-class GURL;
class URLRequest;
namespace appcache {
@@ -51,11 +52,37 @@
LOG_ERROR,
};
+struct AppCacheInfo {
+ GURL manifest_url;
+ base::Time creation_time;
+ base::Time last_update_time;
+ base::Time last_access_time;
+ int64 cache_id;
+ Status status;
+ int64 size;
+ bool is_complete;
+ AppCacheInfo() : cache_id(kNoCacheId), status(UNCACHED),
+ size(0), is_complete(false) { }
+};
+
+typedef std::vector<AppCacheInfo> AppCacheInfoVector;
+
+// POD type to hold information about a single appcache resource.
+struct AppCacheResourceInfo {
+ GURL url;
+ int64 size;
+ bool is_master;
+ bool is_manifest;
+ bool is_fallback;
+ bool is_foreign;
+ bool is_explicit;
+};
+
// Interface used by backend (browser-process) to talk to frontend (renderer).
class AppCacheFrontend {
public:
- virtual void OnCacheSelected(int host_id, int64 cache_id ,
- Status status) = 0;
+ virtual void OnCacheSelected(
+ int host_id, const appcache::AppCacheInfo& info) = 0;
virtual void OnStatusChanged(const std::vector<int>& host_ids,
Status status) = 0;
virtual void OnEventRaised(const std::vector<int>& host_ids,
@@ -93,6 +120,8 @@
virtual Status GetStatus(int host_id) = 0;
virtual bool StartUpdate(int host_id) = 0;
virtual bool SwapCache(int host_id) = 0;
+ virtual void GetResourceList(
+ int host_id, std::vector<AppCacheResourceInfo>* resource_infos) = 0;
virtual ~AppCacheBackend() {}
};

Powered by Google App Engine
This is Rietveld 408576698