Chromium Code Reviews| Index: chrome/browser/safe_browsing/srt_client_info_win.cc |
| diff --git a/chrome/browser/safe_browsing/srt_client_info_win.cc b/chrome/browser/safe_browsing/srt_client_info_win.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..699ecb9db662c76fe29eb3354f9337d57b454c72 |
| --- /dev/null |
| +++ b/chrome/browser/safe_browsing/srt_client_info_win.cc |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/safe_browsing/srt_client_info_win.h" |
| + |
| +#include "chrome/common/channel_info.h" |
| +#include "components/version_info/version_info.h" |
| + |
| +namespace safe_browsing { |
| + |
| +const char kChromeVersionSwitch[] = "chrome-version"; |
| +const char kChromeChannelSwitch[] = "chrome-channel"; |
| + |
| +// static |
|
alito
2016/08/26 23:18:08
nit: remove comment?
ftirelo
2016/08/29 00:10:36
Done.
|
| +int ChannelAsInt() { |
| + switch (chrome::GetChannel()) { |
| + case version_info::Channel::UNKNOWN: |
| + return 0; |
| + case version_info::Channel::CANARY: |
| + return 1; |
| + case version_info::Channel::DEV: |
| + return 2; |
| + case version_info::Channel::BETA: |
| + return 3; |
| + case version_info::Channel::STABLE: |
| + return 4; |
| + default: |
|
grt (UTC plus 2)
2016/08/28 19:44:22
remove this so that you get a compiler error in ca
ftirelo
2016/08/29 00:10:36
If I simply remove this, I get this error:
d:\work
grt (UTC plus 2)
2016/08/29 06:56:14
Do this:
switch (chrome::GetChannel() {
cas
ftirelo
2016/08/29 16:30:11
Done.
|
| + return 0; |
| + } |
| +} |
| + |
| +} // namespace safe_browsing |