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

Unified Diff: chrome/browser/safe_browsing/srt_client_info_win.cc

Issue 2286743004: Sends switches to the Software Reporter to enable matching data collection. (Closed)
Patch Set: Second round of reviews Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/safe_browsing/srt_client_info_win.h ('k') | chrome/browser/safe_browsing/srt_fetcher_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ee74d9e92323378adf9bb48d6d9ba41f0f48a804
--- /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 "base/logging.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";
+
+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;
+ }
+ NOTREACHED() << "Invalid channel: " << static_cast<int>(chrome::GetChannel());
grt (UTC plus 2) 2016/08/29 15:53:52 nit: i would omit the text. chances are this will
ftirelo 2016/08/29 16:29:05 Done.
+ return 0;
+}
+
+} // namespace safe_browsing
« no previous file with comments | « chrome/browser/safe_browsing/srt_client_info_win.h ('k') | chrome/browser/safe_browsing/srt_fetcher_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698