OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/safe_browsing/srt_client_info_win.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "chrome/common/channel_info.h" |
| 9 #include "components/version_info/version_info.h" |
| 10 |
| 11 namespace safe_browsing { |
| 12 |
| 13 const char kChromeVersionSwitch[] = "chrome-version"; |
| 14 const char kChromeChannelSwitch[] = "chrome-channel"; |
| 15 |
| 16 int ChannelAsInt() { |
| 17 switch (chrome::GetChannel()) { |
| 18 case version_info::Channel::UNKNOWN: |
| 19 return 0; |
| 20 case version_info::Channel::CANARY: |
| 21 return 1; |
| 22 case version_info::Channel::DEV: |
| 23 return 2; |
| 24 case version_info::Channel::BETA: |
| 25 return 3; |
| 26 case version_info::Channel::STABLE: |
| 27 return 4; |
| 28 } |
| 29 NOTREACHED(); |
| 30 return 0; |
| 31 } |
| 32 |
| 33 } // namespace safe_browsing |
OLD | NEW |