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

Side by Side Diff: base/feature_list.h

Issue 2138923002: Updating FeatureList default initialization pattern (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | base/feature_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 BASE_FEATURE_LIST_H_ 5 #ifndef BASE_FEATURE_LIST_H_
6 #define BASE_FEATURE_LIST_H_ 6 #define BASE_FEATURE_LIST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 std::map<std::string, OverrideEntry> overrides_; 240 std::map<std::string, OverrideEntry> overrides_;
241 241
242 // Locked map that keeps track of seen features, to ensure a single feature is 242 // Locked map that keeps track of seen features, to ensure a single feature is
243 // only defined once. This verification is only done in builds with DCHECKs 243 // only defined once. This verification is only done in builds with DCHECKs
244 // enabled. 244 // enabled.
245 Lock feature_identity_tracker_lock_; 245 Lock feature_identity_tracker_lock_;
246 std::map<std::string, const Feature*> feature_identity_tracker_; 246 std::map<std::string, const Feature*> feature_identity_tracker_;
247 247
248 // Whether this object has been fully initialized. This gets set to true as a 248 // Whether this object has been fully initialized. This gets set to true as a
249 // result of FinalizeInitialization(). 249 // result of FinalizeInitialization().
250 bool initialized_; 250 bool initialized_ = false;
251 251
252 // Whether this object has been initialized from command line. 252 // Whether this object has been initialized from command line.
253 bool initialized_from_command_line_; 253 bool initialized_from_command_line_ = false;
254 254
255 DISALLOW_COPY_AND_ASSIGN(FeatureList); 255 DISALLOW_COPY_AND_ASSIGN(FeatureList);
256 }; 256 };
257 257
258 } // namespace base 258 } // namespace base
259 259
260 #endif // BASE_FEATURE_LIST_H_ 260 #endif // BASE_FEATURE_LIST_H_
OLDNEW
« no previous file with comments | « no previous file | base/feature_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698