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

Side by Side Diff: components/sync/model_impl/model_type_store_backend.h

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 months 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_SYNC_MODEL_IMPL_MODEL_TYPE_STORE_BACKEND_H_ 5 #ifndef COMPONENTS_SYNC_MODEL_IMPL_MODEL_TYPE_STORE_BACKEND_H_
6 #define COMPONENTS_SYNC_MODEL_IMPL_MODEL_TYPE_STORE_BACKEND_H_ 6 #define COMPONENTS_SYNC_MODEL_IMPL_MODEL_TYPE_STORE_BACKEND_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 std::unique_ptr<leveldb::Env> env_; 144 std::unique_ptr<leveldb::Env> env_;
145 145
146 std::unique_ptr<leveldb::DB> db_; 146 std::unique_ptr<leveldb::DB> db_;
147 147
148 std::string path_; 148 std::string path_;
149 149
150 // backend_map_ holds raw pointer of backend, and when stores ask for backend, 150 // backend_map_ holds raw pointer of backend, and when stores ask for backend,
151 // GetOrCreateBackend will return scoped_refptr of backend. backend_map_ 151 // GetOrCreateBackend will return scoped_refptr of backend. backend_map_
152 // doesn't take reference to backend, therefore doesn't block backend 152 // doesn't take reference to backend, therefore doesn't block backend
153 // destruction. 153 // destruction.
154 static base::LazyInstance<BackendMap> backend_map_; 154 static base::LazyInstance<BackendMap>::DestructorAtExit backend_map_;
155 155
156 // Macro wrapped mutex to guard against concurrent calls in debug builds. 156 // Macro wrapped mutex to guard against concurrent calls in debug builds.
157 DFAKE_MUTEX(push_pop_); 157 DFAKE_MUTEX(push_pop_);
158 158
159 DISALLOW_COPY_AND_ASSIGN(ModelTypeStoreBackend); 159 DISALLOW_COPY_AND_ASSIGN(ModelTypeStoreBackend);
160 }; 160 };
161 161
162 } // namespace syncer 162 } // namespace syncer
163 163
164 #endif // COMPONENTS_SYNC_MODEL_IMPL_MODEL_TYPE_STORE_BACKEND_H_ 164 #endif // COMPONENTS_SYNC_MODEL_IMPL_MODEL_TYPE_STORE_BACKEND_H_
OLDNEW
« no previous file with comments | « components/ssl_errors/error_classification.cc ('k') | components/sync/model_impl/model_type_store_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698