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

Side by Side Diff: chrome/browser/dom_ui/bug_report_ui.cc

Issue 5833001: Fix for occasional crash when submitting feedback on a page that is not yet loaded it's title. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed to use GetURL Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/dom_ui/bug_report_ui.h" 5 #include "chrome/browser/dom_ui/bug_report_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 if (((index == 0) && (params != "0")) || !browser || 563 if (((index == 0) && (params != "0")) || !browser ||
564 index >= browser->tab_count()) { 564 index >= browser->tab_count()) {
565 return base::StringPiece( 565 return base::StringPiece(
566 ResourceBundle::GetSharedInstance().GetRawDataResource( 566 ResourceBundle::GetSharedInstance().GetRawDataResource(
567 IDR_BUGREPORT_HTML_INVALID)); 567 IDR_BUGREPORT_HTML_INVALID));
568 } 568 }
569 569
570 TabContents* target_tab = browser->GetTabContentsAt(index); 570 TabContents* target_tab = browser->GetTabContentsAt(index);
571 if (target_tab) { 571 if (target_tab) {
572 target_tab_title_ = target_tab->GetTitle(); 572 target_tab_title_ = target_tab->GetTitle();
573 target_tab_url_ = target_tab->controller().GetActiveEntry()->url().spec(); 573 target_tab_url_ = target_tab->GetURL().spec();
574 } 574 }
575 575
576 // Setup the screenshot source after we've verified input is legit. 576 // Setup the screenshot source after we've verified input is legit.
577 SetupScreenshotsSource(); 577 SetupScreenshotsSource();
578 578
579 return base::StringPiece( 579 return base::StringPiece(
580 ResourceBundle::GetSharedInstance().GetRawDataResource( 580 ResourceBundle::GetSharedInstance().GetRawDataResource(
581 IDR_BUGREPORT_HTML)); 581 IDR_BUGREPORT_HTML));
582 } 582 }
583 583
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 BugReportUIHTMLSource* html_source = 800 BugReportUIHTMLSource* html_source =
801 new BugReportUIHTMLSource(handler->Init()); 801 new BugReportUIHTMLSource(handler->Init());
802 // Set up the chrome://bugreport/ source. 802 // Set up the chrome://bugreport/ source.
803 BrowserThread::PostTask( 803 BrowserThread::PostTask(
804 BrowserThread::IO, FROM_HERE, 804 BrowserThread::IO, FROM_HERE,
805 NewRunnableMethod( 805 NewRunnableMethod(
806 ChromeURLDataManager::GetInstance(), 806 ChromeURLDataManager::GetInstance(),
807 &ChromeURLDataManager::AddDataSource, 807 &ChromeURLDataManager::AddDataSource,
808 make_scoped_refptr(html_source))); 808 make_scoped_refptr(html_source)));
809 } 809 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698