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

Issue 1780006: Ignore *.corp.google.* as GoogleBaseURL (Closed)

Created:
10 years, 8 months ago by ukai
Modified:
9 years, 7 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, jam, Paweł Hajdan Jr., ben+cc_chromium.org
Visibility:
Public.

Description

Ignore *.corp.google.* as GoogleBaseURL On Mac (prior EasyStreet), http://www.google.com might be redirected to wifi.corp.google.com, so that google:baseURL would be set to wifi.corp.google.com, but user might want to use the URL for default search. BUG=38472 TEST=GoogleURLTrackerTest.CheckAndConvertURL passes Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=45674

Patch Set 1 #

Patch Set 2 : fix typo #

Patch Set 3 : fix typo #

Total comments: 5

Patch Set 4 : fix for review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -4 lines) Patch
M chrome/browser/google_url_tracker.cc View 1 2 3 2 chunks +11 lines, -3 lines 0 comments Download
M chrome/browser/google_url_tracker_unittest.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
ukai
10 years, 8 months ago (2010-04-27 02:31:01 UTC) #1
Peter Kasting
10 years, 8 months ago (2010-04-27 03:50:43 UTC) #2
LGTM with nits

http://codereview.chromium.org/1780006/diff/4001/5001
File chrome/browser/google_url_tracker.cc (right):

http://codereview.chromium.org/1780006/diff/4001/5001#newcode1
chrome/browser/google_url_tracker.cc:1: // Copyright (c) 2006-2008 The Chromium
Authors. All rights reserved.
Nit: 2010

http://codereview.chromium.org/1780006/diff/4001/5001#newcode82
chrome/browser/google_url_tracker.cc:82: int google_component_index =
host_components.size() - 2;
Nit: Use size_t instead of int.  Also, just plain "google_component" might be a
little briefer and clearer...

http://codereview.chromium.org/1780006/diff/4001/5001#newcode83
chrome/browser/google_url_tracker.cc:83: std::string& component =
host_components[google_component_index];
Nit: Use const std::string& (google style guide forbids non-const refs, I
accidentally omitted this originally)

http://codereview.chromium.org/1780006/diff/4001/5001#newcode92
chrome/browser/google_url_tracker.cc:92: if (google_component_index > 1) {
Nit: I think "corp.google.com" makes sense to reject too.  And you can simplify
this block slightly.  How about:

// For Google employees only: If the URL appears to be on
// [*.]corp.google.com, it's likely a doorway (e.g.
// wifi.corp.google.com), so ignore it.
if ((google_component > 0) &&
    (host_components[google_component - 1] == "corp"))
  return false;

http://codereview.chromium.org/1780006/diff/4001/5002
File chrome/browser/google_url_tracker_unittest.cc (right):

http://codereview.chromium.org/1780006/diff/4001/5002#newcode1
chrome/browser/google_url_tracker_unittest.cc:1: // Copyright (c) 2006-2008 The
Chromium Authors. All rights reserved.
Nit: 2010

Powered by Google App Engine
This is Rietveld 408576698