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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/state_store.h

Issue 1243293003: Platform-specific prune state storage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prune1
Patch Set: moved uninstall cleanup to separate cl Created 5 years, 3 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: chrome/browser/safe_browsing/incident_reporting/state_store.h
diff --git a/chrome/browser/safe_browsing/incident_reporting/state_store.h b/chrome/browser/safe_browsing/incident_reporting/state_store.h
index 91b56ad215bc24178ee0e06003f87c290787f077..c2226170f4c7e751442a41f501a9cb4f851732c0 100644
--- a/chrome/browser/safe_browsing/incident_reporting/state_store.h
+++ b/chrome/browser/safe_browsing/incident_reporting/state_store.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_STATE_STORE_H_
#define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_STATE_STORE_H_
+#include <string>
+
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/prefs/scoped_user_pref_update.h"
@@ -39,13 +41,21 @@ class StateStore {
// Clears all data associated with an incident type.
void ClearForType(IncidentType type);
+ // Clears all data in the store.
+ void ClearAll();
+
private:
+ friend class StateStore;
+
// Returns a writable view on the incidents_sent preference. The act of
// obtaining this view will cause a serialize-and-write operation to be
// scheduled when the transaction terminates. Use the store's
// |incidents_sent_| member directly to simply query the preference.
base::DictionaryValue* GetPrefDict();
+ // Replaces the contents of the underlying dictionary value.
+ void ReplacePrefDict(scoped_ptr<base::DictionaryValue> pref_dict);
+
// The store corresponding to this transaction.
StateStore* store_;

Powered by Google App Engine
This is Rietveld 408576698