OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/common/extensions/features/feature.h" | 5 #include "chrome/common/extensions/features/feature.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 // static | 362 // static |
363 void Feature::SetChannelForTesting(VersionInfo::Channel channel) { | 363 void Feature::SetChannelForTesting(VersionInfo::Channel channel) { |
364 g_channel.Get().SetChannelForTesting(channel); | 364 g_channel.Get().SetChannelForTesting(channel); |
365 } | 365 } |
366 | 366 |
367 // static | 367 // static |
368 void Feature::ResetChannelForTesting() { | 368 void Feature::ResetChannelForTesting() { |
369 g_channel.Get().ResetChannelForTesting(); | 369 g_channel.Get().ResetChannelForTesting(); |
370 } | 370 } |
371 | 371 |
| 372 // static |
| 373 chrome::VersionInfo::Channel Feature::GetCurrentChannel() { |
| 374 if (g_channel_checking_enabled) |
| 375 return g_channel.Get().GetChannel(); |
| 376 return chrome::VersionInfo::GetChannel(); |
| 377 } |
| 378 |
372 } // namespace | 379 } // namespace |
OLD | NEW |