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