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

Side by Side Diff: chrome/browser/ui/sad_tab.cc

Issue 2866273003: [Android] Improve sad tab strings (Closed)
Patch Set: Changes from tedchoc@ review Created 3 years, 7 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
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/tab/SadTabTest.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/sad_tab.h" 5 #include "chrome/browser/ui/sad_tab.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "chrome/browser/net/referrer.h" 8 #include "chrome/browser/net/referrer.h"
9 #include "chrome/browser/ui/browser_finder.h" 9 #include "chrome/browser/ui/browser_finder.h"
10 #include "chrome/browser/ui/chrome_pages.h" 10 #include "chrome/browser/ui/chrome_pages.h"
(...skipping 18 matching lines...) Expand all
29 // This macro uses a static counter to track how many times it's hit in a 29 // This macro uses a static counter to track how many times it's hit in a
30 // session. See Tabs.SadTab.CrashCreated in histograms.xml for details. 30 // session. See Tabs.SadTab.CrashCreated in histograms.xml for details.
31 #define UMA_SAD_TAB_COUNTER(histogram_name) \ 31 #define UMA_SAD_TAB_COUNTER(histogram_name) \
32 { \ 32 { \
33 static int count = 0; \ 33 static int count = 0; \
34 ++count; \ 34 ++count; \
35 UMA_HISTOGRAM_COUNTS_1000(histogram_name, count); \ 35 UMA_HISTOGRAM_COUNTS_1000(histogram_name, count); \
36 } 36 }
37 37
38 // This enum backs an UMA histogram, so it should be treated as append-only. 38 // This enum backs an UMA histogram, so it should be treated as append-only.
39 // A Java counterpart exists in
msw 2017/05/10 23:32:32 incomplete sentence
Theresa 2017/05/10 23:34:33 Done. Sorry, this line was supposed to be deleted.
40 // A Java counterpart will be generated for this enum.
41 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.tab
39 enum SadTabEvent { 42 enum SadTabEvent {
40 DISPLAYED, 43 DISPLAYED,
41 BUTTON_CLICKED, 44 BUTTON_CLICKED,
42 HELP_LINK_CLICKED, 45 HELP_LINK_CLICKED,
43 MAX_SAD_TAB_EVENT 46 MAX_SAD_TAB_EVENT
44 }; 47 };
45 48
46 void RecordEvent(bool feedback, SadTabEvent event) { 49 void RecordEvent(bool feedback, SadTabEvent event) {
47 if (feedback) { 50 if (feedback) {
48 UMA_HISTOGRAM_ENUMERATION("Tabs.SadTab.Feedback.Event", event, 51 UMA_HISTOGRAM_ENUMERATION("Tabs.SadTab.Feedback.Event", event,
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // Fall through 207 // Fall through
205 case chrome::SAD_TAB_KIND_KILLED: 208 case chrome::SAD_TAB_KIND_KILLED:
206 UMA_SAD_TAB_COUNTER("Tabs.SadTab.KillCreated"); 209 UMA_SAD_TAB_COUNTER("Tabs.SadTab.KillCreated");
207 LOG(WARNING) << "Tab Killed: " 210 LOG(WARNING) << "Tab Killed: "
208 << web_contents->GetURL().GetOrigin().spec(); 211 << web_contents->GetURL().GetOrigin().spec();
209 break; 212 break;
210 } 213 }
211 } 214 }
212 215
213 } // namespace chrome 216 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/tab/SadTabTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698