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

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: 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 if (target_tab->controller().GetActiveEntry()) {
sky 2010/12/14 23:06:18 Why doesn't this use target_tab->GetURL()? That de
rkc 2010/12/14 23:20:48 This is code pulled from the legacy report a bug d
574 target_tab_url_ =
575 target_tab->controller().GetActiveEntry()->url().spec();
576 }
574 } 577 }
575 578
576 // Setup the screenshot source after we've verified input is legit. 579 // Setup the screenshot source after we've verified input is legit.
577 SetupScreenshotsSource(); 580 SetupScreenshotsSource();
578 581
579 return base::StringPiece( 582 return base::StringPiece(
580 ResourceBundle::GetSharedInstance().GetRawDataResource( 583 ResourceBundle::GetSharedInstance().GetRawDataResource(
581 IDR_BUGREPORT_HTML)); 584 IDR_BUGREPORT_HTML));
582 } 585 }
583 586
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 BugReportUIHTMLSource* html_source = 803 BugReportUIHTMLSource* html_source =
801 new BugReportUIHTMLSource(handler->Init()); 804 new BugReportUIHTMLSource(handler->Init());
802 // Set up the chrome://bugreport/ source. 805 // Set up the chrome://bugreport/ source.
803 BrowserThread::PostTask( 806 BrowserThread::PostTask(
804 BrowserThread::IO, FROM_HERE, 807 BrowserThread::IO, FROM_HERE,
805 NewRunnableMethod( 808 NewRunnableMethod(
806 ChromeURLDataManager::GetInstance(), 809 ChromeURLDataManager::GetInstance(),
807 &ChromeURLDataManager::AddDataSource, 810 &ChromeURLDataManager::AddDataSource,
808 make_scoped_refptr(html_source))); 811 make_scoped_refptr(html_source)));
809 } 812 }
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