OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_STORAGE_IMPL_H_ | 5 #ifndef THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_STORAGE_IMPL_H_ |
6 #define THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_STORAGE_IMPL_H_ | 6 #define THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_STORAGE_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
| 9 #include <memory> |
9 #include <string> | 10 #include <string> |
| 11 #include <vector> |
10 | 12 |
11 #include "base/macros.h" | 13 #include "base/macros.h" |
12 #include "base/memory/scoped_vector.h" | |
13 #include "base/scoped_observer.h" | 14 #include "base/scoped_observer.h" |
14 #include "components/prefs/pref_store.h" | 15 #include "components/prefs/pref_store.h" |
15 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/storage.h" | 16 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/storage.h" |
16 | 17 |
17 class WriteablePrefStore; | 18 class WriteablePrefStore; |
18 | 19 |
19 namespace autofill { | 20 namespace autofill { |
20 | 21 |
21 // An implementation of the Storage interface which passes through to an | 22 // An implementation of the Storage interface which passes through to an |
22 // underlying WriteablePrefStore. | 23 // underlying WriteablePrefStore. |
(...skipping 20 matching lines...) Expand all Loading... |
43 std::string key; | 44 std::string key; |
44 const Callback& callback; | 45 const Callback& callback; |
45 }; | 46 }; |
46 | 47 |
47 // Non-const version of Get(). | 48 // Non-const version of Get(). |
48 void DoGet(const std::string& key, const Callback& data_ready); | 49 void DoGet(const std::string& key, const Callback& data_ready); |
49 | 50 |
50 WriteablePrefStore* backing_store_; // weak | 51 WriteablePrefStore* backing_store_; // weak |
51 | 52 |
52 // Get requests that haven't yet been serviced. | 53 // Get requests that haven't yet been serviced. |
53 ScopedVector<Request> outstanding_requests_; | 54 std::vector<std::unique_ptr<Request>> outstanding_requests_; |
54 | 55 |
55 ScopedObserver<PrefStore, ChromeStorageImpl> scoped_observer_; | 56 ScopedObserver<PrefStore, ChromeStorageImpl> scoped_observer_; |
56 | 57 |
57 DISALLOW_COPY_AND_ASSIGN(ChromeStorageImpl); | 58 DISALLOW_COPY_AND_ASSIGN(ChromeStorageImpl); |
58 }; | 59 }; |
59 | 60 |
60 } // namespace autofill | 61 } // namespace autofill |
61 | 62 |
62 #endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_STORAGE_IMPL_H_ | 63 #endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_STORAGE_IMPL_H_ |
OLD | NEW |