Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7196)

Unified Diff: chrome/browser/ui/webui/feedback_ui.cc

Issue 10698115: Support "Report Issue" in case of no-browser windows in ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« ash/accelerators/accelerator_table.h ('K') | « chrome/browser/ui/views/ash/chrome_shell_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698