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

Unified Diff: chrome/browser/prefs/tracked/hash_store_contents.h

Issue 1227973003: Componentize //chrome/browser/prefs/tracked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 4 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/prefs/tracked/hash_store_contents.h
diff --git a/chrome/browser/prefs/tracked/hash_store_contents.h b/chrome/browser/prefs/tracked/hash_store_contents.h
deleted file mode 100644
index ff6e39a9e778b1c095b1e3e76e064400554abbb6..0000000000000000000000000000000000000000
--- a/chrome/browser/prefs/tracked/hash_store_contents.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2014 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_PREFS_TRACKED_HASH_STORE_CONTENTS_H_
-#define CHROME_BROWSER_PREFS_TRACKED_HASH_STORE_CONTENTS_H_
-
-#include <string>
-
-#include "base/memory/scoped_ptr.h"
-
-namespace base {
-class DictionaryValue;
-} // namespace base
-
-// Provides access to the contents of a preference hash store. The store
-// contains the following data:
-// Contents: a client-defined dictionary that should map preference names to
-// MACs.
-// Version: a client-defined version number for the format of Contents.
-// Super MAC: a MAC that authenticates the entirety of Contents.
-// Legacy hash stores may have an ID that was incorporated into MAC
-// calculations. The ID, if any, is available via |hash_store_id()|.
-class HashStoreContents {
- public:
- // Used to modify a DictionaryValue stored in the preference hash store. The
- // MutableDictionary should be destroyed when modifications are complete in
- // order to allow them to be committed to the underlying storage.
- class MutableDictionary {
- public:
- virtual ~MutableDictionary() {}
- // Returns the DictionaryValue, which will be created if it does not already
- // exist.
- virtual base::DictionaryValue* operator->() = 0;
- };
-
- virtual ~HashStoreContents() {}
-
- // Returns the hash-store ID. May be empty.
- virtual std::string hash_store_id() const = 0;
-
- // Discards all data related to this hash store.
- virtual void Reset() = 0;
-
- // Indicates whether any data is currently stored for this hash store.
- virtual bool IsInitialized() const = 0;
-
- // Retrieves the contents of this hash store. May return NULL if the hash
- // store has not been initialized.
- virtual const base::DictionaryValue* GetContents() const = 0;
-
- // Provides mutable access to the contents of this hash store.
- virtual scoped_ptr<MutableDictionary> GetMutableContents() = 0;
-
- // Retrieves the super MAC value previously stored by SetSuperMac. May be
- // empty if no super MAC has been stored.
- virtual std::string GetSuperMac() const = 0;
-
- // Stores a super MAC value for this hash store.
- virtual void SetSuperMac(const std::string& super_mac) = 0;
-};
-
-#endif // CHROME_BROWSER_PREFS_TRACKED_HASH_STORE_CONTENTS_H_

Powered by Google App Engine
This is Rietveld 408576698