<commit_before>// 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 BASE_PREFS_WRITEABLE_PREF_STORE_H_
#define BASE_PREFS_WRITEABLE_PREF_STORE_H_

#include <string>

#include "base/basictypes.h"
#include "base/prefs/pref_store.h"

namespace base {
class Value;
}

// A pref store that can be written to as well as read from.
class BASE_PREFS_EXPORT WriteablePrefStore : public PrefStore {
 public:
  // PrefWriteFlags can be used to change the way a pref will be written to
  // storage.
  enum PrefWriteFlags : uint32 {
    // No flags are specified.
    DEFAULT_PREF_WRITE_FLAGS = 0,

    // This marks the pref as "lossy". There is no strict time guarantee on when
    // a lossy pref will be persisted to permanent storage when it is modified.
    LOSSY_PREF_WRITE_FLAG = 1 << 1
  };

  WriteablePrefStore() {}

  // Sets a |value| for |key| in the store. |value| must be non-NULL. |flags| is
  // a bitmask of PrefWriteFlags.
  virtual void SetValue(const std::string& key,
                        scoped_ptr<base::Value> value,
                        uint32 flags) = 0;<commit_msg>Add missing base/memory/scoped_ptr.h include to base/prefs/writeable_pref_store.h<commit_after>// 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 BASE_PREFS_WRITEABLE_PREF_STORE_H_
#define BASE_PREFS_WRITEABLE_PREF_STORE_H_

#include <string>

#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/prefs/pref_store.h"

namespace base {
class Value;
}

// A pref store that can be written to as well as read from.
class BASE_PREFS_EXPORT WriteablePrefStore : public PrefStore {
 public:
  // PrefWriteFlags can be used to change the way a pref will be written to
  // storage.
  enum PrefWriteFlags : uint32 {
    // No flags are specified.
    DEFAULT_PREF_WRITE_FLAGS = 0,

    // This marks the pref as "lossy". There is no strict time guarantee on when
    // a lossy pref will be persisted to permanent storage when it is modified.
    LOSSY_PREF_WRITE_FLAG = 1 << 1
  };

  WriteablePrefStore() {}

  // Sets a |value| for |key| in the store. |value| must be non-NULL. |flags| is
  // a bitmask of PrefWriteFlags.
  virtual void SetValue(const std::string& key,
                        scoped_ptr<base::Value> value,
                        uint32 flags) = 0;
{'fraction_non_alphanumeric': 0.08088818398096749, 'fraction_numerical': 0.00951625693893735, 'mean_word_length': 3.1158238172920063, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5879186', 'n_tokens_mistral': 820, 'n_tokens_neox': 780, 'n_words': 294}