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

Side by Side Diff: courgette/courgette_config.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT ios Created 5 years, 3 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 "courgette/courgette_config.h" 5 #include "courgette/courgette_config.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "courgette/ensemble.h" 8 #include "courgette/ensemble.h"
9 9
10 namespace courgette { 10 namespace courgette {
11 11
12 namespace { 12 namespace {
13 13
14 static const uint32 kExperimentalVersion = 0xDEADBEEF; 14 static const uint32 kExperimentalVersion = 0xDEADBEEF;
15 15
16 } // namespace 16 } // namespace
17 17
18 // static 18 // static
19 CourgetteConfig* CourgetteConfig::GetInstance() { 19 CourgetteConfig* CourgetteConfig::GetInstance() {
20 return Singleton<CourgetteConfig>::get(); 20 return base::Singleton<CourgetteConfig>::get();
21 } 21 }
22 22
23 uint32 CourgetteConfig::ensemble_version() const { 23 uint32 CourgetteConfig::ensemble_version() const {
24 return is_experimental_ ? kExperimentalVersion : CourgettePatchFile::kVersion; 24 return is_experimental_ ? kExperimentalVersion : CourgettePatchFile::kVersion;
25 } 25 }
26 26
27 void CourgetteConfig::Initialize(const base::CommandLine& command_line) { 27 void CourgetteConfig::Initialize(const base::CommandLine& command_line) {
28 is_experimental_ = command_line.HasSwitch("experimental"); 28 is_experimental_ = command_line.HasSwitch("experimental");
29 } 29 }
30 30
31 CourgetteConfig::CourgetteConfig() : is_experimental_(false) { 31 CourgetteConfig::CourgetteConfig() : is_experimental_(false) {
32 } 32 }
33 33
34 } // namespace courgette 34 } // namespace courgette
OLDNEW
« base/memory/singleton.h ('K') | « courgette/courgette_config.h ('k') | crypto/capi_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698