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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(), WindowOpenDisposition::NEW_FOREGROUND_TAB, | 363 content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB, |
364 ui::PAGE_TRANSITION_LINK, false)); | 364 ui::PAGE_TRANSITION_LINK, false)); |
365 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_HELP); | 365 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_HELP); |
366 } | 366 } |
367 | 367 |
368 void SessionCrashedBubbleView::DidStartNavigationToPendingEntry( | 368 void SessionCrashedBubbleView::DidStartNavigationToPendingEntry( |
369 const GURL& url, | 369 const GURL& url, |
370 content::NavigationController::ReloadType reload_type) { | 370 content::ReloadType reload_type) { |
371 started_navigation_ = true; | 371 started_navigation_ = true; |
372 } | 372 } |
373 | 373 |
374 void SessionCrashedBubbleView::DidFinishLoad( | 374 void SessionCrashedBubbleView::DidFinishLoad( |
375 content::RenderFrameHost* render_frame_host, | 375 content::RenderFrameHost* render_frame_host, |
376 const GURL& validated_url) { | 376 const GURL& validated_url) { |
377 if (started_navigation_) | 377 if (started_navigation_) |
378 CloseBubble(); | 378 CloseBubble(); |
379 } | 379 } |
380 | 380 |
(...skipping 29 matching lines...) Expand all Loading... |
410 if (uma_option_ && uma_option_->checked()) { | 410 if (uma_option_ && uma_option_->checked()) { |
411 ChangeMetricsReportingState(true); | 411 ChangeMetricsReportingState(true); |
412 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_UMA_OPTIN); | 412 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_UMA_OPTIN); |
413 } | 413 } |
414 CloseBubble(); | 414 CloseBubble(); |
415 } | 415 } |
416 | 416 |
417 void SessionCrashedBubbleView::CloseBubble() { | 417 void SessionCrashedBubbleView::CloseBubble() { |
418 GetWidget()->Close(); | 418 GetWidget()->Close(); |
419 } | 419 } |
OLD | NEW |