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

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

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 #include "components/sync/model_impl/model_type_store_backend.h" 5 #include "components/sync/model_impl/model_type_store_backend.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 14 matching lines...) Expand all
25 namespace syncer { 25 namespace syncer {
26 26
27 const int64_t kInvalidSchemaVersion = -1; 27 const int64_t kInvalidSchemaVersion = -1;
28 const int64_t ModelTypeStoreBackend::kLatestSchemaVersion = 1; 28 const int64_t ModelTypeStoreBackend::kLatestSchemaVersion = 1;
29 const char ModelTypeStoreBackend::kDBSchemaDescriptorRecordId[] = 29 const char ModelTypeStoreBackend::kDBSchemaDescriptorRecordId[] =
30 "_mts_schema_descriptor"; 30 "_mts_schema_descriptor";
31 const char ModelTypeStoreBackend::kStoreInitResultHistogramName[] = 31 const char ModelTypeStoreBackend::kStoreInitResultHistogramName[] =
32 "Sync.ModelTypeStoreInitResult"; 32 "Sync.ModelTypeStoreInitResult";
33 33
34 // static 34 // static
35 base::LazyInstance<ModelTypeStoreBackend::BackendMap> 35 base::LazyInstance<ModelTypeStoreBackend::BackendMap>::DestructorAtExit
36 ModelTypeStoreBackend::backend_map_ = LAZY_INSTANCE_INITIALIZER; 36 ModelTypeStoreBackend::backend_map_ = LAZY_INSTANCE_INITIALIZER;
37 37
38 namespace { 38 namespace {
39 39
40 StoreInitResultForHistogram LevelDbStatusToStoreInitResult( 40 StoreInitResultForHistogram LevelDbStatusToStoreInitResult(
41 const leveldb::Status& status) { 41 const leveldb::Status& status) {
42 if (status.ok()) 42 if (status.ok())
43 return STORE_INIT_RESULT_SUCCESS; 43 return STORE_INIT_RESULT_SUCCESS;
44 if (status.IsNotFound()) 44 if (status.IsNotFound())
45 return STORE_INIT_RESULT_NOT_FOUND; 45 return STORE_INIT_RESULT_NOT_FOUND;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 258
259 // static 259 // static
260 void ModelTypeStoreBackend::RecordStoreInitResultHistogram( 260 void ModelTypeStoreBackend::RecordStoreInitResultHistogram(
261 StoreInitResultForHistogram result) { 261 StoreInitResultForHistogram result) {
262 UMA_HISTOGRAM_ENUMERATION(kStoreInitResultHistogramName, result, 262 UMA_HISTOGRAM_ENUMERATION(kStoreInitResultHistogramName, result,
263 STORE_INIT_RESULT_COUNT); 263 STORE_INIT_RESULT_COUNT);
264 } 264 }
265 265
266 } // namespace syncer 266 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/model_impl/model_type_store_backend.h ('k') | components/url_matcher/url_matcher_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698