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

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..e28e38ac63d8d802817721e30ed947abc3594a34 100644
--- a/chrome/browser/ui/webui/feedback_ui.cc
+++ b/chrome/browser/ui/webui/feedback_ui.cc
@@ -386,7 +386,7 @@ 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;
Browser* browser = browser::FindBrowserWithID(session_id);
@@ -394,9 +394,11 @@ bool FeedbackHandler::Init() {
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

Powered by Google App Engine
This is Rietveld 408576698