Chromium Code Reviews| Index: chrome/browser/ui/webui/feedback_ui.cc |
| diff --git a/chrome/browser/ui/webui/feedback_ui.cc b/chrome/browser/ui/webui/feedback_ui.cc |
| index bc994feca853c1dd2560b4407b18959af812ff65..57f8e7481d93687292959d1554a24724aae705f9 100644 |
| --- a/chrome/browser/ui/webui/feedback_ui.cc |
| +++ b/chrome/browser/ui/webui/feedback_ui.cc |
| @@ -386,17 +386,24 @@ bool FeedbackHandler::Init() { |
| // If we don't have a page url specified, get it from the tab index. |
| if (custom_page_url.empty()) { |
| - if (session_id == -1 || index == -1) |
| + if (session_id == -1) |
| return false; |
| +#if !defined(OS_CHROMEOS) |
|
rkc1
2012/07/09 18:23:22
We set the index in ShowFeedbackView for all platf
Jun Mukai
2012/07/10 11:08:20
That's browser->active_index() in line 178, right?
rkc1
2012/07/10 17:20:10
Yes, let's remove it for all platforms. There are
Jun Mukai
2012/07/11 12:42:39
Sure, then removed the check itself. now index==-
|
| + if (index == -1) |
| + return false; |
| +#endif |
| + |
| Browser* browser = browser::FindBrowserWithID(session_id); |
| // Sanity checks. |
| if (!browser || index >= browser->tab_count()) |
| return false; |
| - WebContents* target_tab = chrome::GetWebContentsAt(browser, index); |
| - if (target_tab) |
| - target_tab_url_ = target_tab->GetURL().spec(); |
| + if (index >= 0) { |
| + WebContents* target_tab = chrome::GetWebContentsAt(browser, index); |
| + if (target_tab) |
| + target_tab_url_ = target_tab->GetURL().spec(); |
| + } |
| // Note: We don't need to setup a screenshot source if we're using a |
| // custom page URL since we were invoked from JS/an extension, in which |