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

Side by Side Diff: chrome/browser/ui/views/session_crashed_bubble_view.cc

Issue 2802703004: Log creation for many dialog box types. (Closed)
Patch Set: Enums better match class names. Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/views/session_crashed_bubble_view.h" 5 #include "chrome/browser/ui/views/session_crashed_bubble_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/metrics/histogram_macros.h" 15 #include "base/metrics/histogram_macros.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "chrome/browser/metrics/metrics_reporting_state.h" 17 #include "chrome/browser/metrics/metrics_reporting_state.h"
18 #include "chrome/browser/prefs/session_startup_pref.h" 18 #include "chrome/browser/prefs/session_startup_pref.h"
19 #include "chrome/browser/sessions/session_restore.h" 19 #include "chrome/browser/sessions/session_restore.h"
20 #include "chrome/browser/ui/browser_dialogs.h"
20 #include "chrome/browser/ui/browser_list.h" 21 #include "chrome/browser/ui/browser_list.h"
21 #include "chrome/browser/ui/browser_list_observer.h" 22 #include "chrome/browser/ui/browser_list_observer.h"
22 #include "chrome/browser/ui/tabs/tab_strip_model.h" 23 #include "chrome/browser/ui/tabs/tab_strip_model.h"
23 #include "chrome/browser/ui/views/frame/browser_view.h" 24 #include "chrome/browser/ui/views/frame/browser_view.h"
24 #include "chrome/browser/ui/views/toolbar/app_menu_button.h" 25 #include "chrome/browser/ui/views/toolbar/app_menu_button.h"
25 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" 26 #include "chrome/browser/ui/views/toolbar/toolbar_view.h"
26 #include "chrome/grit/chromium_strings.h" 27 #include "chrome/grit/chromium_strings.h"
27 #include "chrome/grit/generated_resources.h" 28 #include "chrome/grit/generated_resources.h"
28 #include "chrome/installer/util/google_update_settings.h" 29 #include "chrome/installer/util/google_update_settings.h"
29 #include "components/strings/grit/components_chromium_strings.h" 30 #include "components/strings/grit/components_chromium_strings.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 166
166 SessionCrashedBubbleView::SessionCrashedBubbleView(views::View* anchor_view, 167 SessionCrashedBubbleView::SessionCrashedBubbleView(views::View* anchor_view,
167 Browser* browser, 168 Browser* browser,
168 bool offer_uma_optin) 169 bool offer_uma_optin)
169 : BubbleDialogDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT), 170 : BubbleDialogDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT),
170 browser_(browser), 171 browser_(browser),
171 uma_option_(NULL), 172 uma_option_(NULL),
172 offer_uma_optin_(offer_uma_optin), 173 offer_uma_optin_(offer_uma_optin),
173 ignored_(true) { 174 ignored_(true) {
174 set_close_on_deactivate(false); 175 set_close_on_deactivate(false);
176 chrome::RecordDialogCreation(chrome::DialogIdentifier::SESSION_CRASHED);
175 } 177 }
176 178
177 SessionCrashedBubbleView::~SessionCrashedBubbleView() { 179 SessionCrashedBubbleView::~SessionCrashedBubbleView() {
178 } 180 }
179 181
180 base::string16 SessionCrashedBubbleView::GetWindowTitle() const { 182 base::string16 SessionCrashedBubbleView::GetWindowTitle() const {
181 return l10n_util::GetStringUTF16(IDS_SESSION_CRASHED_BUBBLE_TITLE); 183 return l10n_util::GetStringUTF16(IDS_SESSION_CRASHED_BUBBLE_TITLE);
182 } 184 }
183 185
184 bool SessionCrashedBubbleView::ShouldShowWindowTitle() const { 186 bool SessionCrashedBubbleView::ShouldShowWindowTitle() const {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 // There's no opt-out choice in the crash restore bubble. 345 // There's no opt-out choice in the crash restore bubble.
344 if (uma_option_ && uma_option_->checked()) { 346 if (uma_option_ && uma_option_->checked()) {
345 ChangeMetricsReportingState(true); 347 ChangeMetricsReportingState(true);
346 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_UMA_OPTIN); 348 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_UMA_OPTIN);
347 } 349 }
348 } 350 }
349 351
350 void SessionCrashedBubbleView::CloseBubble() { 352 void SessionCrashedBubbleView::CloseBubble() {
351 GetWidget()->Close(); 353 GetWidget()->Close();
352 } 354 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/outdated_upgrade_bubble_view.cc ('k') | chrome/browser/ui/views/sync/one_click_signin_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698