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

Issue 10780013: Add reverse URL handler for shortening uber URLs (Closed)

Created:
8 years, 5 months ago by Cem Kocagil
Modified:
8 years, 3 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, mihaip-chromium-reviews_chromium.org, browser-components-watch_chromium.org, Aaron Boodman
Visibility:
Public.

Description

Add reverse URL handler for shortening uber URLs BUG=120493 TEST=Open the settings page. The address bar should show "chrome://settings". Click the "extensions" button on the left. The address bar should show "chrome://extensions". Click the "settings" button on the left, "show advanced settings", "content settings". The address bar should show "chrome://settings/content". Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157576

Patch Set 1 #

Patch Set 2 : fixed frame navigation issues #

Total comments: 4

Patch Set 3 : added tests #

Total comments: 5

Patch Set 4 : comments #

Total comments: 12

Patch Set 5 : comments 2 #

Total comments: 2

Patch Set 6 : comments 3 #

Total comments: 3

Patch Set 7 : comments 4 #

Total comments: 1

Patch Set 8 : browser test #

Total comments: 5

Patch Set 9 : rebased #

Patch Set 10 : comments 5 #

Patch Set 11 : d #

Patch Set 12 : #

Patch Set 13 : do not handle path urls #

Patch Set 14 : fix tests #

Patch Set 15 : rebased 2 #

Patch Set 16 : #

Patch Set 17 : fix tests 2 #

Patch Set 18 : short uber #

Total comments: 4

Patch Set 19 : #

Total comments: 4

Patch Set 20 : bugfix, style fix #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -19 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +65 lines, -2 lines 3 comments Download
A chrome/browser/chrome_content_browser_client_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 13 14 15 17 1 chunk +50 lines, -0 lines 0 comments Download
M chrome/browser/extensions/lazy_background_page_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/history/history_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/browser_navigator_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 14 chunks +27 lines, -14 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/navigation_controller_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +11 lines, -1 line 0 comments Download

Messages

Total messages: 65 (0 generated)
Cem Kocagil
This patch shortens the URLs as needed, but for some reason pushState and friends don't ...
8 years, 5 months ago (2012-07-15 21:29:21 UTC) #1
Cem Kocagil
It turns out that the URL handler pairs are doing some quite complex stuff, such ...
8 years, 5 months ago (2012-07-24 13:52:53 UTC) #2
Cem Kocagil
https://chromiumcodereview.appspot.com/10780013/diff/5001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://chromiumcodereview.appspot.com/10780013/diff/5001/chrome/browser/chrome_content_browser_client.cc#newcode163 chrome/browser/chrome_content_browser_client.cc:163: url_canon::Replacements<char> replacements; This addition here is to ensure that ...
8 years, 5 months ago (2012-07-25 23:02:33 UTC) #3
Alexei Svitkine (slow)
I'll do a more thorough review in a bit, but here's some initial comments. First, ...
8 years, 5 months ago (2012-07-26 15:12:31 UTC) #4
Cem Kocagil
Updated. Added a test, addressed the style issue.
8 years, 4 months ago (2012-08-02 21:50:33 UTC) #5
Alexei Svitkine (slow)
Thanks. Here are some more comments. https://chromiumcodereview.appspot.com/10780013/diff/11001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://chromiumcodereview.appspot.com/10780013/diff/11001/chrome/browser/chrome_content_browser_client.cc#newcode203 chrome/browser/chrome_content_browser_client.cc:203: bool HandleWebUIReverse(GURL* url, ...
8 years, 4 months ago (2012-08-02 22:00:11 UTC) #6
Cem Kocagil
Updated. > This needs a comment explaining what it does, including what the > params ...
8 years, 4 months ago (2012-08-03 09:23:35 UTC) #7
Alexei Svitkine (slow)
Sorry for taking a while to review this. Here are some more comments your way. ...
8 years, 4 months ago (2012-08-07 14:59:33 UTC) #8
Cem Kocagil
Updated. http://codereview.chromium.org/10780013/diff/15001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): http://codereview.chromium.org/10780013/diff/15001/chrome/browser/chrome_content_browser_client.cc#newcode167 chrome/browser/chrome_content_browser_client.cc:167: GURL chrome_url = url->ReplaceComponents(replacements); On 2012/08/07 14:59:33, Alexei ...
8 years, 4 months ago (2012-08-07 20:56:22 UTC) #9
Alexei Svitkine (slow)
Thanks! Getting close now. Do your TEST= instructions encompass the entirety of the behavior this ...
8 years, 4 months ago (2012-08-08 15:07:40 UTC) #10
Cem Kocagil
Updated. - Changed TEST= to test the NavigationControllerImpl change as well. - Fixed the substr ...
8 years, 4 months ago (2012-08-08 18:44:25 UTC) #11
Alexei Svitkine (slow)
https://chromiumcodereview.appspot.com/10780013/diff/11003/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://chromiumcodereview.appspot.com/10780013/diff/11003/chrome/browser/chrome_content_browser_client.cc#newcode161 chrome/browser/chrome_content_browser_client.cc:161: GURL ReplaceURLHostAndPath(const GURL url, const std::string host, Pass these ...
8 years, 4 months ago (2012-08-08 18:55:55 UTC) #12
Cem Kocagil
Updated.
8 years, 4 months ago (2012-08-08 19:26:45 UTC) #13
Alexei Svitkine (slow)
LGTM
8 years, 4 months ago (2012-08-08 19:35:06 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cem.kocagil@gmail.com/10780013/17003
8 years, 4 months ago (2012-08-08 19:39:22 UTC) #15
commit-bot: I haz the power
Presubmit check for 10780013-17003 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 4 months ago (2012-08-08 19:39:26 UTC) #16
Cem Kocagil
-avi +ben, jam, sky for owners I'm not very familiar with the testing framework, so ...
8 years, 4 months ago (2012-08-08 21:29:28 UTC) #17
sky
I swapped myself with Brett, who knows more about this.
8 years, 4 months ago (2012-08-08 21:59:36 UTC) #18
jam
if you run checkdeps, you'll see you got a layering violation. i would try to ...
8 years, 4 months ago (2012-08-08 23:37:51 UTC) #19
Cem Kocagil
Updated. Uses a browser test now. Removed the comment in content/ mentioning uber. CQing for ...
8 years, 4 months ago (2012-08-09 22:17:44 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cem.kocagil@gmail.com/10780013/9004
8 years, 4 months ago (2012-08-09 22:17:59 UTC) #21
commit-bot: I haz the power
Presubmit check for 10780013-9004 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 4 months ago (2012-08-09 22:18:02 UTC) #22
Cem Kocagil
Could anyone review the new test? (Mailing again in case my last mail got buried ...
8 years, 4 months ago (2012-08-10 17:19:43 UTC) #23
Alexei Svitkine (slow)
I've started some try jobs for you; it seems there's patch failure on the Mac ...
8 years, 4 months ago (2012-08-10 19:13:56 UTC) #24
Cem Kocagil
Updated. https://chromiumcodereview.appspot.com/10780013/diff/9004/chrome/browser/chrome_content_browser_client_browsertest.cc File chrome/browser/chrome_content_browser_client_browsertest.cc (right): https://chromiumcodereview.appspot.com/10780013/diff/9004/chrome/browser/chrome_content_browser_client_browsertest.cc#newcode21 chrome/browser/chrome_content_browser_client_browsertest.cc:21: return chrome::GetTabContentsAt(browser(), 0)->web_contents() On 2012/08/10 19:13:56, Alexei Svitkine ...
8 years, 4 months ago (2012-08-11 16:41:30 UTC) #25
Cem Kocagil
d
8 years, 4 months ago (2012-08-11 20:31:22 UTC) #26
Alexei Svitkine (slow)
Your patch seems to be failing a bunch of tests. See the red win_rel, linux_rel ...
8 years, 4 months ago (2012-08-13 14:52:22 UTC) #27
Alexei Svitkine (slow)
Hey, whatever happened to this? Did you have a chance to look at the failing ...
8 years, 3 months ago (2012-09-12 14:26:20 UTC) #28
Cem Kocagil
Yes, I have been away for a while, I'm now back and fixing the tests.
8 years, 3 months ago (2012-09-12 14:40:30 UTC) #29
Alexei Svitkine (slow)
On 2012/09/12 14:40:30, Cem Kocagil wrote: > Yes, I have been away for a while, ...
8 years, 3 months ago (2012-09-12 14:42:23 UTC) #30
Cem Kocagil
On 2012/09/12 14:42:23, Alexei Svitkine wrote: > On 2012/09/12 14:40:30, Cem Kocagil wrote: > > ...
8 years, 3 months ago (2012-09-12 15:42:55 UTC) #31
Alexei Svitkine (slow)
Try jobs submitted; will take a look at the changes later today.
8 years, 3 months ago (2012-09-12 15:44:42 UTC) #32
Alexei Svitkine (slow)
Looks like 'update' step failed. You probably need to sync with latest code and merge/resolve ...
8 years, 3 months ago (2012-09-12 15:50:38 UTC) #33
Cem Kocagil
Rebased, could you submit tryjobs again?
8 years, 3 months ago (2012-09-12 17:11:52 UTC) #34
Alexei Svitkine (slow)
Try jobs sent.
8 years, 3 months ago (2012-09-12 17:45:00 UTC) #35
Alexei Svitkine (slow)
(Still update failures. Click through to the jobs to see the output.)
8 years, 3 months ago (2012-09-12 17:58:11 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cem.kocagil@gmail.com/10780013/37001
8 years, 3 months ago (2012-09-13 17:37:48 UTC) #37
commit-bot: I haz the power
Presubmit check for 10780013-37001 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 3 months ago (2012-09-13 17:37:59 UTC) #38
Cem Kocagil
Okay, I couldn't get CQ to test it. Could you submit some tryjobs again?
8 years, 3 months ago (2012-09-13 17:39:39 UTC) #39
Alexei Svitkine (slow)
On 2012/09/13 17:39:39, Cem Kocagil wrote: > Okay, I couldn't get CQ to test it. ...
8 years, 3 months ago (2012-09-13 17:58:22 UTC) #40
Cem Kocagil
short uber
8 years, 3 months ago (2012-09-13 18:54:47 UTC) #41
Cem Kocagil
On 2012/09/13 17:58:22, Alexei Svitkine wrote: > On 2012/09/13 17:39:39, Cem Kocagil wrote: > > ...
8 years, 3 months ago (2012-09-13 18:58:00 UTC) #42
Alexei Svitkine (slow)
On 2012/09/13 18:58:00, Cem Kocagil wrote: > On 2012/09/13 17:58:22, Alexei Svitkine wrote: > > ...
8 years, 3 months ago (2012-09-13 19:11:04 UTC) #43
Cem Kocagil
Thanks! All bots except win_rel are green now. win_rel shows red but I checked and ...
8 years, 3 months ago (2012-09-13 21:21:07 UTC) #44
brettw
+creis for navigation controller
8 years, 3 months ago (2012-09-13 21:31:41 UTC) #45
Charlie Reis
Can you provide a better CL description, and provide a BUG= line referencing which bug ...
8 years, 3 months ago (2012-09-13 22:10:09 UTC) #46
Cem Kocagil
Oh, gcl deleted my issue description, I'll write one again. https://chromiumcodereview.appspot.com/10780013/diff/23011/content/browser/web_contents/navigation_controller_impl.cc File content/browser/web_contents/navigation_controller_impl.cc (right): https://chromiumcodereview.appspot.com/10780013/diff/23011/content/browser/web_contents/navigation_controller_impl.cc#newcode929 ...
8 years, 3 months ago (2012-09-13 22:40:03 UTC) #47
Charlie Reis
https://chromiumcodereview.appspot.com/10780013/diff/23011/content/browser/web_contents/navigation_controller_impl.cc File content/browser/web_contents/navigation_controller_impl.cc (right): https://chromiumcodereview.appspot.com/10780013/diff/23011/content/browser/web_contents/navigation_controller_impl.cc#newcode929 content/browser/web_contents/navigation_controller_impl.cc:929: // update the virtual URL when replaceState is called ...
8 years, 3 months ago (2012-09-13 22:58:22 UTC) #48
Cem Kocagil
Updated, renamed temp and reverse_on_redirect.
8 years, 3 months ago (2012-09-14 00:02:25 UTC) #49
Charlie Reis
Thanks. navigation_controller_impl.cc LGTM.
8 years, 3 months ago (2012-09-14 00:07:57 UTC) #50
Alexei Svitkine (slow)
Still LGTM with a couple remaining nits. http://codereview.chromium.org/10780013/diff/26016/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): http://codereview.chromium.org/10780013/diff/26016/chrome/browser/chrome_content_browser_client.cc#newcode211 chrome/browser/chrome_content_browser_client.cc:211: if (url->host() ...
8 years, 3 months ago (2012-09-14 14:15:27 UTC) #51
Cem Kocagil
Looks like we need reviewing and owners lgtms for a few files. Ben, could you ...
8 years, 3 months ago (2012-09-14 16:12:42 UTC) #52
Ben Goodger (Google)
lgtm
8 years, 3 months ago (2012-09-17 15:59:02 UTC) #53
Cem Kocagil
Alexei, please review the bugfix in chrome_content_browser_client.cc. If it still looks good, I'd like to ...
8 years, 3 months ago (2012-09-17 18:28:40 UTC) #54
Alexei Svitkine (slow)
http://codereview.chromium.org/10780013/diff/28018/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): http://codereview.chromium.org/10780013/diff/28018/chrome/browser/chrome_content_browser_client.cc#newcode187 chrome/browser/chrome_content_browser_client.cc:187: const std::string new_path = url.host() + url.path(); On 2012/09/17 ...
8 years, 3 months ago (2012-09-17 18:34:26 UTC) #55
Cem Kocagil
http://codereview.chromium.org/10780013/diff/28018/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): http://codereview.chromium.org/10780013/diff/28018/chrome/browser/chrome_content_browser_client.cc#newcode187 chrome/browser/chrome_content_browser_client.cc:187: const std::string new_path = url.host() + url.path(); On 2012/09/17 ...
8 years, 3 months ago (2012-09-17 18:37:46 UTC) #56
Cem Kocagil
This is waiting for review (nothing urgent, just making sure my last reply is seen).
8 years, 3 months ago (2012-09-19 15:48:17 UTC) #57
Alexei Svitkine (slow)
Oops, thought I replied already. Still LGTM.
8 years, 3 months ago (2012-09-19 15:51:09 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cem.kocagil@gmail.com/10780013/28018
8 years, 3 months ago (2012-09-19 16:01:26 UTC) #59
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build. Your ...
8 years, 3 months ago (2012-09-19 16:25:02 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cem.kocagil@gmail.com/10780013/28018
8 years, 3 months ago (2012-09-19 16:33:59 UTC) #61
commit-bot: I haz the power
Retried try job too often for step(s) content_browsertests
8 years, 3 months ago (2012-09-19 18:17:00 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cem.kocagil@gmail.com/10780013/28018
8 years, 3 months ago (2012-09-19 18:29:17 UTC) #63
commit-bot: I haz the power
Change committed as 157576
8 years, 3 months ago (2012-09-19 18:46:47 UTC) #64
Alexei Svitkine (slow)
8 years, 3 months ago (2012-09-19 20:50:41 UTC) #65
This failed on the waterfall after landing (and reverted by the sheriffs):

ChromeContentBrowserClientBrowserTest.UberURLHandler: 
chrome/browser/chrome_content_browser_client_browsertest.cc:46: Failure
Value of: entry->GetURL()
Actual: chrome://chrome/settings/
Expected: url2_long
Which is: chrome://chrome/settings/content
chrome/browser/chrome_content_browser_client_browsertest.cc:47: Failure
Value of: entry->GetVirtualURL()
Actual: chrome://settings/
Expected: url2_short
Which is: chrome://settings/content

Unfortunately, you'll have to create a new review with the patch and then fix
that test and we can land it again.

Powered by Google App Engine
This is Rietveld 408576698