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

Unified Diff: chrome/browser/expected_install_modules_win.cc

Issue 23513049: Implement install module verification metric. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer comments. Created 7 years, 3 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
Index: chrome/browser/expected_install_modules_win.cc
diff --git a/chrome/browser/expected_install_modules_win.cc b/chrome/browser/expected_install_modules_win.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3981b7921b4dab51e409150efd80d282b6df9459
--- /dev/null
+++ b/chrome/browser/expected_install_modules_win.cc
@@ -0,0 +1,39 @@
+// Copyright (c) 2013 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/expected_install_modules_win.h"
+#include "base/strings/string_util.h"
+
+// Do not reorder these elements. Their index is used as an ID in metrics
+// reporting.
robertshield 2013/09/16 15:07:21 Would an array of (module, id) pairs be less prone
robertshield 2013/09/17 17:06:59 Let me know what you think of the above.
erikwright (departed) 2013/09/17 17:20:52 Sorry for forgetting to reply here. I'm not convi
robertshield 2013/09/17 17:28:02 Fair enough. My theory is that the copy paste erro
+extern const char* kExpectedInstallModules[] = {
+ "chrome.dll",
+ "icudt.dll",
+ "chrome_frame_helper.dll",
+ "d3dcompiler_46.dll",
+ "libglesv2.dll",
+ "metro_driver.dll",
+ "pdf.dll",
+ "widevinecdmadapter.dll",
+ "chrome_child.dll",
+ "d3dcompiler_43.dll",
+ "ffmpegsumo.dll",
+ "libegl.dll",
+ "libpeerconnection.dll",
+ "npchrome_frame.dll",
+ "ppgooglenaclpluginchrome.dll",
+ "xinput1_3.dll",
+ 0
+};
+
+std::string CanonicalizeModuleName(const std::string& module_name) {
+ std::string result;
+ size_t slash = module_name.rfind('/');
robertshield 2013/09/16 15:07:21 Where does this get its module names from? This lo
erikwright (departed) 2013/09/16 20:04:55 Done.
+ if (slash != std::string::npos)
+ result = module_name.substr(slash + 1);
+ else
+ result = module_name;
+ StringToLowerASCII(&result);
+ return result;
+}
« no previous file with comments | « chrome/browser/expected_install_modules_win.h ('k') | chrome/browser/install_module_verifier_unittest_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698