| OLD | NEW |
| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 | 391 |
| 392 return uma_view; | 392 return uma_view; |
| 393 } | 393 } |
| 394 | 394 |
| 395 void SessionCrashedBubbleView::ButtonPressed(views::Button* sender, | 395 void SessionCrashedBubbleView::ButtonPressed(views::Button* sender, |
| 396 const ui::Event& event) { | 396 const ui::Event& event) { |
| 397 DCHECK_EQ(sender, restore_button_); | 397 DCHECK_EQ(sender, restore_button_); |
| 398 RestorePreviousSession(sender); | 398 RestorePreviousSession(sender); |
| 399 } | 399 } |
| 400 | 400 |
| 401 void SessionCrashedBubbleView::StyledLabelLinkClicked(const gfx::Range& range, | 401 void SessionCrashedBubbleView::StyledLabelLinkClicked(views::StyledLabel& label, |
| 402 const gfx::Range& range, |
| 402 int event_flags) { | 403 int event_flags) { |
| 403 browser_->OpenURL(content::OpenURLParams( | 404 browser_->OpenURL(content::OpenURLParams( |
| 404 GURL("https://support.google.com/chrome/answer/96817"), | 405 GURL("https://support.google.com/chrome/answer/96817"), |
| 405 content::Referrer(), | 406 content::Referrer(), |
| 406 NEW_FOREGROUND_TAB, | 407 NEW_FOREGROUND_TAB, |
| 407 ui::PAGE_TRANSITION_LINK, | 408 ui::PAGE_TRANSITION_LINK, |
| 408 false)); | 409 false)); |
| 409 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_HELP); | 410 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_HELP); |
| 410 } | 411 } |
| 411 | 412 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 if (uma_option_ && uma_option_->checked()) { | 455 if (uma_option_ && uma_option_->checked()) { |
| 455 InitiateMetricsReportingChange(true, OnMetricsReportingCallbackType()); | 456 InitiateMetricsReportingChange(true, OnMetricsReportingCallbackType()); |
| 456 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_UMA_OPTIN); | 457 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_UMA_OPTIN); |
| 457 } | 458 } |
| 458 CloseBubble(); | 459 CloseBubble(); |
| 459 } | 460 } |
| 460 | 461 |
| 461 void SessionCrashedBubbleView::CloseBubble() { | 462 void SessionCrashedBubbleView::CloseBubble() { |
| 462 GetWidget()->Close(); | 463 GetWidget()->Close(); |
| 463 } | 464 } |
| OLD | NEW |