Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_CONTEXTUAL_SEARCH_BROWSER_DEVICE_INT_STORAGE_H_ | |
| 6 #define COMPONENTS_CONTEXTUAL_SEARCH_BROWSER_DEVICE_INT_STORAGE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 | |
| 12 namespace contextual_search { | |
| 13 | |
| 14 // Interface for device-specific integer storage. | |
| 15 // Allows callers to read and write integers to persistent storage on the | |
| 16 // device. | |
| 17 class DeviceIntStorage { | |
| 18 public: | |
| 19 DeviceIntStorage() {} | |
| 20 virtual ~DeviceIntStorage() {} | |
| 21 | |
| 22 // Reads and returns the integer keyed by |storage_key| | |
| 23 virtual int ReadInt(std::string storage_key) = 0; | |
| 24 // Writes the integer |value| to the storage bin keyed by |storage_key|. | |
| 25 virtual void WriteInt(std::string storage_key, int value) = 0; | |
| 26 | |
|
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.
| |
| 27 private: | |
| 28 DISALLOW_COPY_AND_ASSIGN(DeviceIntStorage); | |
| 29 }; | |
| 30 | |
| 31 } // namespace contextual_search | |
| 32 | |
| 33 #endif // COMPONENTS_CONTEXTUAL_SEARCH_BROWSER_DEVICE_INT_STORAGE_H_ | |
| OLD | NEW |