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

Side by Side Diff: chrome/browser/metrics/metrics_log.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/browser/metrics/metrics_log.h" 5 #include "chrome/browser/metrics/metrics_log.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 } 962 }
963 } 963 }
964 } 964 }
965 965
966 void MetricsLog::RecordOmniboxOpenedURL(const AutocompleteLog& log) { 966 void MetricsLog::RecordOmniboxOpenedURL(const AutocompleteLog& log) {
967 DCHECK(!locked()); 967 DCHECK(!locked());
968 968
969 // Write the XML version. 969 // Write the XML version.
970 OPEN_ELEMENT_FOR_SCOPE("uielement"); 970 OPEN_ELEMENT_FOR_SCOPE("uielement");
971 WriteAttribute("action", "autocomplete"); 971 WriteAttribute("action", "autocomplete");
972 WriteAttribute("targetidhash", ""); 972 WriteAttribute("targetidhash", std::string());
973 // TODO(kochi): Properly track windows. 973 // TODO(kochi): Properly track windows.
974 WriteIntAttribute("window", 0); 974 WriteIntAttribute("window", 0);
975 if (log.tab_id != -1) { 975 if (log.tab_id != -1) {
976 // If we know what tab the autocomplete URL was opened in, log it. 976 // If we know what tab the autocomplete URL was opened in, log it.
977 WriteIntAttribute("tab", static_cast<int>(log.tab_id)); 977 WriteIntAttribute("tab", static_cast<int>(log.tab_id));
978 } 978 }
979 WriteCommonEventAttributes(); 979 WriteCommonEventAttributes();
980 980
981 std::vector<string16> terms; 981 std::vector<string16> terms;
982 const int num_terms = 982 const int num_terms =
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 ProductDataToProto(google_update_metrics.google_update_data, 1080 ProductDataToProto(google_update_metrics.google_update_data,
1081 google_update->mutable_google_update_status()); 1081 google_update->mutable_google_update_status());
1082 } 1082 }
1083 1083
1084 if (!google_update_metrics.product_data.version.empty()) { 1084 if (!google_update_metrics.product_data.version.empty()) {
1085 ProductDataToProto(google_update_metrics.product_data, 1085 ProductDataToProto(google_update_metrics.product_data,
1086 google_update->mutable_client_status()); 1086 google_update->mutable_client_status());
1087 } 1087 }
1088 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) 1088 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN)
1089 } 1089 }
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/media_galleries_preferences.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698