Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / prefs / pref_hash_calculator.h
index a1c97b5..f1a88ef 100644 (file)
@@ -19,7 +19,8 @@ class PrefHashCalculator {
   enum ValidationResult {
     INVALID,
     VALID,
-    VALID_LEGACY,
+    // Valid under a deprecated but as secure algorithm.
+    VALID_SECURE_LEGACY,
   };
 
   // Constructs a PrefHashCalculator using |seed| and |device_id|. The same
@@ -27,6 +28,8 @@ class PrefHashCalculator {
   // |device_id| may be empty.
   PrefHashCalculator(const std::string& seed, const std::string& device_id);
 
+  ~PrefHashCalculator();
+
   // Calculates a hash value for the supplied preference |path| and |value|.
   // |value| may be null if the preference has no value.
   std::string Calculate(const std::string& path, const base::Value* value)
@@ -39,13 +42,9 @@ class PrefHashCalculator {
                             const std::string& hash) const;
 
  private:
-  // Concatenates |device_id_|, |path|, and |value_as_string| to give the hash
-  // input.
-  std::string GetMessage(const std::string& path,
-                         const std::string& value_as_string) const;
-
-  std::string seed_;
-  std::string device_id_;
+  const std::string seed_;
+  const std::string device_id_;
+  const std::string legacy_device_id_;
 
   DISALLOW_COPY_AND_ASSIGN(PrefHashCalculator);
 };