Chromium Code Reviews| Index: components/contextual_search/browser/device_int_storage.h |
| diff --git a/components/contextual_search/browser/device_int_storage.h b/components/contextual_search/browser/device_int_storage.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4c3d0bfffb46b397da560dc3626750e3bf623e6c |
| --- /dev/null |
| +++ b/components/contextual_search/browser/device_int_storage.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2016 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 COMPONENTS_CONTEXTUAL_SEARCH_BROWSER_DEVICE_INT_STORAGE_H_ |
| +#define COMPONENTS_CONTEXTUAL_SEARCH_BROWSER_DEVICE_INT_STORAGE_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/macros.h" |
| + |
| +namespace contextual_search { |
| + |
| +// Interface for device-specific integer storage. |
| +// Allows callers to read and write integers to persistent storage on the |
| +// device. |
| +class DeviceIntStorage { |
| + public: |
| + DeviceIntStorage() {} |
| + virtual ~DeviceIntStorage() {} |
| + |
| + // Reads and returns the integer keyed by |storage_key| |
| + virtual int ReadInt(std::string storage_key) = 0; |
| + // Writes the integer |value| to the storage bin keyed by |storage_key|. |
| + virtual void WriteInt(std::string storage_key, int value) = 0; |
| + |
|
marq (ping after 24h)
2016/08/30 08:30:36
If this class is intended to be an abstraction lay
Donn Denman
2016/08/31 04:35:21
Done.
|
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(DeviceIntStorage); |
| +}; |
| + |
| +} // namespace contextual_search |
| + |
| +#endif // COMPONENTS_CONTEXTUAL_SEARCH_BROWSER_DEVICE_INT_STORAGE_H_ |