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

Issue 3155038: Change the path used to refer to tabs to a reference. (Closed)

Created:
10 years, 4 months ago by rkc1
Modified:
9 years, 7 months ago
Reviewers:
dhg, zel
CC:
chromium-reviews, ben+cc_chromium.org
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

Change the path used to refer to tabs to a reference. ShowSingletonTab considers only base URL's as unique; adding a /path opens another tab despite one being present at the base URL; changing the path to a ref fixes it. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=57090

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -3 lines) Patch
M chrome/browser/dom_ui/bug_report_ui.cc View 4 chunks +6 lines, -3 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
rkc1
10 years, 4 months ago (2010-08-23 15:13:24 UTC) #1
zel
LGTM
10 years, 4 months ago (2010-08-23 15:43:17 UTC) #2
dhg
10 years, 4 months ago (2010-08-23 15:44:36 UTC) #3
LGTM

On Mon, Aug 23, 2010 at 8:13 AM,  <rkc@google.com> wrote:
> Reviewers: zel, dhg,
>
> Description:
> Change the path used to refer to tabs to a reference.
> ShowSingletonTab considers only base URL's as unique; adding a /path opens
> another tab despite one being present at the base URL; changing the path to
> a
> ref fixes it.
>
> Please review this at http://codereview.chromium.org/3155038/show
>
> SVN Base: http://src.chromium.org/git/chromium.git
>
> Affected files:
>  M chrome/browser/dom_ui/bug_report_ui.cc
>
>
> Index: chrome/browser/dom_ui/bug_report_ui.cc
> diff --git a/chrome/browser/dom_ui/bug_report_ui.cc
> b/chrome/browser/dom_ui/bug_report_ui.cc
> index
>
09ac979467786f2690e392137cd5d85cf1d5a6ad..a2b184fe1ed225d5987f991c76783995c9cac626
> 100644
> --- a/chrome/browser/dom_ui/bug_report_ui.cc
> +++ b/chrome/browser/dom_ui/bug_report_ui.cc
> @@ -165,7 +165,7 @@ void RefreshLastScreenshot(views::Window* parent) {
>  // Global "display this dialog" function declared in browser_dialogs.h.
>  void ShowHtmlBugReportView(views::Window* parent, Browser* browser) {
>   std::string bug_report_url = std::string(chrome::kChromeUIBugReportURL) +
> -      base::IntToString(browser->selected_index());
> +      "#" + base::IntToString(browser->selected_index());
>
>   RefreshLastScreenshot(parent);
>   browser->ShowSingletonTab(GURL(bug_report_url));
> @@ -424,10 +424,11 @@ base::StringPiece BugReportHandler::Init() {
>   }
>
>   std::string params =
> page_url.substr(strlen(chrome::kChromeUIBugReportURL));
> +  // Erase the # - the first character.
> +  params.erase(params.begin(),params.begin() + 1);
>
>   int index = 0;
>   if (!base::StringToInt(params, &index)) {
> -    ClobberScreenshotsSource();
>     return base::StringPiece(
>         ResourceBundle::GetSharedInstance().GetRawDataResource(
>             IDR_BUGREPORT_HTML_INVALID));
> @@ -435,7 +436,6 @@ base::StringPiece BugReportHandler::Init() {
>
>   // Sanity checks.
>   if (((index == 0) && (params != "0")) || (index >= browser_->tab_count()))
> {
> -    ClobberScreenshotsSource();
>     return base::StringPiece(
>         ResourceBundle::GetSharedInstance().GetRawDataResource(
>             IDR_BUGREPORT_HTML_INVALID));
> @@ -446,6 +446,9 @@ base::StringPiece BugReportHandler::Init() {
>   else
>     LOG(FATAL) << "Failed to get last active browser.";
>
> +  // Setup the screenshot source after we've verified input is legit.
> +  SetupScreenshotsSource();
> +
>   return base::StringPiece(
>       ResourceBundle::GetSharedInstance().GetRawDataResource(
>  #if defined(OS_CHROMEOS)
>
>
>

Powered by Google App Engine
This is Rietveld 408576698