Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: components/filesystem/public/cpp/prefs/filesystem_json_pref_store.h

Issue 2492283002: Mojo C++ bindings: switch components/filesystem mojom target to use STL types. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 COMPONENTS_FILESYSTEM_PUBLIC_CPP_PREFS_FILESYSTEM_JSON_PREF_STORE_H_ 5 #ifndef COMPONENTS_FILESYSTEM_PUBLIC_CPP_PREFS_FILESYSTEM_JSON_PREF_STORE_H_
6 #define COMPONENTS_FILESYSTEM_PUBLIC_CPP_PREFS_FILESYSTEM_JSON_PREF_STORE_H_ 6 #define COMPONENTS_FILESYSTEM_PUBLIC_CPP_PREFS_FILESYSTEM_JSON_PREF_STORE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 void OnOpenFilesystem(base::Closure callback, mojom::FileError err); 141 void OnOpenFilesystem(base::Closure callback, mojom::FileError err);
142 142
143 // Asynchronous implementation details of PerformWrite(). 143 // Asynchronous implementation details of PerformWrite().
144 void OnTempFileWriteStart(); 144 void OnTempFileWriteStart();
145 void OnTempFileWrite(mojom::FileError err); 145 void OnTempFileWrite(mojom::FileError err);
146 void OnTempFileRenamed(mojom::FileError err); 146 void OnTempFileRenamed(mojom::FileError err);
147 147
148 // Asynchronous implementation details of ReadPrefsAsync(). 148 // Asynchronous implementation details of ReadPrefsAsync().
149 void OnPreferencesReadStart(); 149 void OnPreferencesReadStart();
150 void OnPreferencesFileRead(mojom::FileError err, 150 void OnPreferencesFileRead(mojom::FileError err,
151 mojo::Array<uint8_t> contents); 151 const std::vector<uint8_t>& contents);
152 152
153 const std::string path_; 153 const std::string path_;
154 mojo::Binding<filesystem::mojom::FileSystemClient> binding_; 154 mojo::Binding<filesystem::mojom::FileSystemClient> binding_;
155 filesystem::mojom::FileSystemPtr filesystem_; 155 filesystem::mojom::FileSystemPtr filesystem_;
156 156
157 // |directory_| is only bound after the first attempt to access the 157 // |directory_| is only bound after the first attempt to access the
158 // |filesystem. See OpenFilesystem(). 158 // |filesystem. See OpenFilesystem().
159 mojom::DirectoryPtr directory_; 159 mojom::DirectoryPtr directory_;
160 160
161 std::unique_ptr<base::DictionaryValue> prefs_; 161 std::unique_ptr<base::DictionaryValue> prefs_;
162 162
163 bool read_only_; 163 bool read_only_;
164 164
165 std::unique_ptr<PrefFilter> pref_filter_; 165 std::unique_ptr<PrefFilter> pref_filter_;
166 base::ObserverList<PrefStore::Observer, true> observers_; 166 base::ObserverList<PrefStore::Observer, true> observers_;
167 167
168 std::unique_ptr<ReadErrorDelegate> error_delegate_; 168 std::unique_ptr<ReadErrorDelegate> error_delegate_;
169 169
170 bool initialized_; 170 bool initialized_;
171 bool filtering_in_progress_; 171 bool filtering_in_progress_;
172 bool pending_lossy_write_; 172 bool pending_lossy_write_;
173 PrefReadError read_error_; 173 PrefReadError read_error_;
174 174
175 DISALLOW_COPY_AND_ASSIGN(FilesystemJsonPrefStore); 175 DISALLOW_COPY_AND_ASSIGN(FilesystemJsonPrefStore);
176 }; 176 };
177 177
178 } // namespace filesystem 178 } // namespace filesystem
179 179
180 #endif // COMPONENTS_FILESYSTEM_PUBLIC_CPP_PREFS_FILESYSTEM_JSON_PREF_STORE_H_ 180 #endif // COMPONENTS_FILESYSTEM_PUBLIC_CPP_PREFS_FILESYSTEM_JSON_PREF_STORE_H_
OLDNEW
« no previous file with comments | « components/filesystem/file_impl_unittest.cc ('k') | components/filesystem/public/cpp/prefs/filesystem_json_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698