| OLD | NEW |
| 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 |
| OLD | NEW |