| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 base::string16 SessionCrashedBubbleView::GetDialogButtonLabel( | 353 base::string16 SessionCrashedBubbleView::GetDialogButtonLabel( |
| 354 ui::DialogButton button) const { | 354 ui::DialogButton button) const { |
| 355 return l10n_util::GetStringUTF16(IDS_SESSION_CRASHED_VIEW_RESTORE_BUTTON); | 355 return l10n_util::GetStringUTF16(IDS_SESSION_CRASHED_VIEW_RESTORE_BUTTON); |
| 356 } | 356 } |
| 357 | 357 |
| 358 void SessionCrashedBubbleView::StyledLabelLinkClicked(views::StyledLabel* label, | 358 void SessionCrashedBubbleView::StyledLabelLinkClicked(views::StyledLabel* label, |
| 359 const gfx::Range& range, | 359 const gfx::Range& range, |
| 360 int event_flags) { | 360 int event_flags) { |
| 361 browser_->OpenURL(content::OpenURLParams( | 361 browser_->OpenURL(content::OpenURLParams( |
| 362 GURL("https://support.google.com/chrome/answer/96817"), | 362 GURL("https://support.google.com/chrome/answer/96817"), |
| 363 content::Referrer(), | 363 content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB, |
| 364 NEW_FOREGROUND_TAB, | 364 ui::PAGE_TRANSITION_LINK, false)); |
| 365 ui::PAGE_TRANSITION_LINK, | |
| 366 false)); | |
| 367 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_HELP); | 365 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_HELP); |
| 368 } | 366 } |
| 369 | 367 |
| 370 void SessionCrashedBubbleView::DidStartNavigationToPendingEntry( | 368 void SessionCrashedBubbleView::DidStartNavigationToPendingEntry( |
| 371 const GURL& url, | 369 const GURL& url, |
| 372 content::NavigationController::ReloadType reload_type) { | 370 content::NavigationController::ReloadType reload_type) { |
| 373 started_navigation_ = true; | 371 started_navigation_ = true; |
| 374 } | 372 } |
| 375 | 373 |
| 376 void SessionCrashedBubbleView::DidFinishLoad( | 374 void SessionCrashedBubbleView::DidFinishLoad( |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 if (uma_option_ && uma_option_->checked()) { | 410 if (uma_option_ && uma_option_->checked()) { |
| 413 ChangeMetricsReportingState(true); | 411 ChangeMetricsReportingState(true); |
| 414 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_UMA_OPTIN); | 412 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_UMA_OPTIN); |
| 415 } | 413 } |
| 416 CloseBubble(); | 414 CloseBubble(); |
| 417 } | 415 } |
| 418 | 416 |
| 419 void SessionCrashedBubbleView::CloseBubble() { | 417 void SessionCrashedBubbleView::CloseBubble() { |
| 420 GetWidget()->Close(); | 418 GetWidget()->Close(); |
| 421 } | 419 } |
| OLD | NEW |