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

Unified Diff: content/public/browser/dom_storage_context.h

Issue 10449103: Update the DOMStorageContext public interface in the content layer to remove FilePaths and origin_i… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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: content/public/browser/dom_storage_context.h
===================================================================
--- content/public/browser/dom_storage_context.h (revision 139818)
+++ content/public/browser/dom_storage_context.h (working copy)
@@ -10,14 +10,12 @@
#include "base/callback.h"
#include "base/string16.h"
+#include "base/time.h"
#include "content/common/content_export.h"
+#include "googleurl/src/gurl.h"
class FilePath;
-namespace base {
-class Time;
-}
-
namespace content {
class BrowserContext;
@@ -25,25 +23,29 @@
// Represents the per-BrowserContext Local Storage data.
class DOMStorageContext {
public:
+ struct UsageInfo {
+ GURL origin;
+ size_t data_size;
+ base::Time last_modified;
+
+ UsageInfo();
jochen (gone - plz use gerrit) 2012/06/01 11:00:44 nit methods before data members
+ ~UsageInfo();
+ };
+
+ typedef base::Callback<void(const std::vector<UsageInfo>&)>
+ GetUsageInfoCallback;
+
+ virtual void GetUsageInfo(const GetUsageInfoCallback& callback) = 0;
+ virtual void DeleteOrigin(const GURL& origin) = 0;
+
+ // The stuff below is DEPRECATED.
typedef base::Callback<void(const std::vector<FilePath>&)>
GetAllStorageFilesCallback;
-
- // Returns all the file paths of local storage files to the given callback.
virtual void GetAllStorageFiles(
const GetAllStorageFilesCallback& callback) = 0;
-
- // Get the file name of the local storage file for the given origin.
virtual FilePath GetFilePath(const string16& origin_id) const = 0;
-
- // Deletes the local storage file for the given origin.
virtual void DeleteForOrigin(const string16& origin_id) = 0;
-
- // Deletes a single local storage file.
virtual void DeleteLocalStorageFile(const FilePath& file_path) = 0;
-
- // Delete any local storage files that have been touched since the cutoff
- // date that's supplied. Protected origins, per the SpecialStoragePolicy,
- // are not deleted by this method.
virtual void DeleteDataModifiedSince(const base::Time& cutoff) = 0;
protected:

Powered by Google App Engine
This is Rietveld 408576698