| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/sad_tab.h" | 5 #include "chrome/browser/ui/sad_tab.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
| 8 #include "chrome/browser/net/referrer.h" | 8 #include "chrome/browser/net/referrer.h" |
| 9 #include "chrome/browser/ui/browser_finder.h" | 9 #include "chrome/browser/ui/browser_finder.h" |
| 10 #include "chrome/browser/ui/chrome_pages.h" | 10 #include "chrome/browser/ui/chrome_pages.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 case Action::BUTTON: | 158 case Action::BUTTON: |
| 159 RecordEvent(show_feedback_button_, SadTabEvent::BUTTON_CLICKED); | 159 RecordEvent(show_feedback_button_, SadTabEvent::BUTTON_CLICKED); |
| 160 if (show_feedback_button_) { | 160 if (show_feedback_button_) { |
| 161 chrome::ShowFeedbackPage( | 161 chrome::ShowFeedbackPage( |
| 162 chrome::FindBrowserWithWebContents(web_contents_), | 162 chrome::FindBrowserWithWebContents(web_contents_), |
| 163 l10n_util::GetStringUTF8(kind_ == chrome::SAD_TAB_KIND_CRASHED | 163 l10n_util::GetStringUTF8(kind_ == chrome::SAD_TAB_KIND_CRASHED |
| 164 ? IDS_CRASHED_TAB_FEEDBACK_MESSAGE | 164 ? IDS_CRASHED_TAB_FEEDBACK_MESSAGE |
| 165 : IDS_KILLED_TAB_FEEDBACK_MESSAGE), | 165 : IDS_KILLED_TAB_FEEDBACK_MESSAGE), |
| 166 std::string(kCategoryTagCrash)); | 166 std::string(kCategoryTagCrash)); |
| 167 } else { | 167 } else { |
| 168 web_contents_->GetController().Reload(true); | 168 web_contents_->GetController().Reload(content::ReloadType::NORMAL, |
| 169 true); |
| 169 } | 170 } |
| 170 break; | 171 break; |
| 171 case Action::HELP_LINK: | 172 case Action::HELP_LINK: |
| 172 RecordEvent(show_feedback_button_, SadTabEvent::HELP_LINK_CLICKED); | 173 RecordEvent(show_feedback_button_, SadTabEvent::HELP_LINK_CLICKED); |
| 173 content::OpenURLParams params(GURL(GetHelpLinkURL()), content::Referrer(), | 174 content::OpenURLParams params(GURL(GetHelpLinkURL()), content::Referrer(), |
| 174 WindowOpenDisposition::CURRENT_TAB, | 175 WindowOpenDisposition::CURRENT_TAB, |
| 175 ui::PAGE_TRANSITION_LINK, false); | 176 ui::PAGE_TRANSITION_LINK, false); |
| 176 web_contents_->OpenURL(params); | 177 web_contents_->OpenURL(params); |
| 177 break; | 178 break; |
| 178 } | 179 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 202 // Fall through | 203 // Fall through |
| 203 case chrome::SAD_TAB_KIND_KILLED: | 204 case chrome::SAD_TAB_KIND_KILLED: |
| 204 UMA_SAD_TAB_COUNTER("Tabs.SadTab.KillCreated"); | 205 UMA_SAD_TAB_COUNTER("Tabs.SadTab.KillCreated"); |
| 205 LOG(WARNING) << "Tab Killed: " | 206 LOG(WARNING) << "Tab Killed: " |
| 206 << web_contents->GetURL().GetOrigin().spec(); | 207 << web_contents->GetURL().GetOrigin().spec(); |
| 207 break; | 208 break; |
| 208 } | 209 } |
| 209 } | 210 } |
| 210 | 211 |
| 211 } // namespace chrome | 212 } // namespace chrome |
| OLD | NEW |