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

Issue 10139002: Preventing our default handlers for ChromeOS to show up or confuse the user (Closed)

Created:
8 years, 8 months ago by Mr4D (OOO till 08-26)
Modified:
8 years, 7 months ago
CC:
chromium-reviews, tony
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Preventing our default handlers for ChromeOS to show up or confuse the user BUG=123368 TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=134283

Patch Set 1 #

Patch Set 2 : Added a few more comments #

Total comments: 8

Patch Set 3 : Addressed issues #

Patch Set 4 : Second review changes #

Total comments: 12

Patch Set 5 : Addressed third review #

Total comments: 3

Patch Set 6 : Addressed 4th review #

Total comments: 4

Patch Set 7 : Addressing fifth review #

Total comments: 5

Patch Set 8 : Addressing 6th review #

Patch Set 9 : Resolving merge issues #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -1 line) Patch
M chrome/app/generated_resources.grd View 1 chunk +22 lines, -0 lines 0 comments Download
M chrome/browser/custom_handlers/protocol_handler_registry.h View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -0 lines 1 comment Download
M chrome/browser/custom_handlers/protocol_handler_registry.cc View 1 2 3 4 5 6 7 8 3 chunks +14 lines, -1 line 0 comments Download
M chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +17 lines, -0 lines 0 comments Download
M chrome/browser/platform_util_chromeos.cc View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 3 4 5 6 7 2 chunks +20 lines, -0 lines 1 comment Download

Messages

Total messages: 24 (0 generated)
Mr4D (OOO till 08-26)
Here is the solution we were talking about. The 'internal ChromeOS' handlers are not presented ...
8 years, 8 months ago (2012-04-19 21:07:46 UTC) #1
sky
I've no clue about this code. Normally I would pick someone from the owners file, ...
8 years, 8 months ago (2012-04-19 22:07:45 UTC) #2
benwells
http://codereview.chromium.org/10139002/diff/2001/chrome/browser/custom_handlers/protocol_handler_registry.cc File chrome/browser/custom_handlers/protocol_handler_registry.cc (right): http://codereview.chromium.org/10139002/diff/2001/chrome/browser/custom_handlers/protocol_handler_registry.cc#newcode297 chrome/browser/custom_handlers/protocol_handler_registry.cc:297: if (IsFixedHandler(scheme)) If I understand this change correctly, ChromeOS ...
8 years, 8 months ago (2012-04-20 00:25:05 UTC) #3
Mr4D (OOO till 08-26)
Thanks for your review! Please have a second look! http://codereview.chromium.org/10139002/diff/2001/chrome/browser/custom_handlers/protocol_handler_registry.cc File chrome/browser/custom_handlers/protocol_handler_registry.cc (right): http://codereview.chromium.org/10139002/diff/2001/chrome/browser/custom_handlers/protocol_handler_registry.cc#newcode297 chrome/browser/custom_handlers/protocol_handler_registry.cc:297: ...
8 years, 8 months ago (2012-04-20 13:44:41 UTC) #4
benwells
http://codereview.chromium.org/10139002/diff/2001/chrome/browser/custom_handlers/protocol_handler_registry.cc File chrome/browser/custom_handlers/protocol_handler_registry.cc (right): http://codereview.chromium.org/10139002/diff/2001/chrome/browser/custom_handlers/protocol_handler_registry.cc#newcode297 chrome/browser/custom_handlers/protocol_handler_registry.cc:297: if (IsFixedHandler(scheme)) On 2012/04/20 13:44:41, Mr4D wrote: > There ...
8 years, 8 months ago (2012-04-20 21:55:10 UTC) #5
Mr4D (OOO till 08-26)
Many thanks for your review! I addressed your comment. See the answer - since I ...
8 years, 8 months ago (2012-04-21 00:27:28 UTC) #6
koz (OOO until 15th September)
So the intent of this change is to install handlers for mailto and webcal into ...
8 years, 8 months ago (2012-04-23 03:43:06 UTC) #7
koz (OOO until 15th September)
http://codereview.chromium.org/10139002/diff/11002/chrome/browser/custom_handlers/protocol_handler_registry.cc File chrome/browser/custom_handlers/protocol_handler_registry.cc (right): http://codereview.chromium.org/10139002/diff/11002/chrome/browser/custom_handlers/protocol_handler_registry.cc#newcode47 chrome/browser/custom_handlers/protocol_handler_registry.cc:47: std::string("mailto"), Replace this with just "mailto" http://codereview.chromium.org/10139002/diff/11002/chrome/browser/custom_handlers/protocol_handler_registry.cc#newcode49 chrome/browser/custom_handlers/protocol_handler_registry.cc:49: UTF8ToUTF16(std::string("Google.com ...
8 years, 8 months ago (2012-04-23 03:55:35 UTC) #8
Mr4D (OOO till 08-26)
Points addressed. Please have another look! http://codereview.chromium.org/10139002/diff/11002/chrome/browser/custom_handlers/protocol_handler_registry.cc File chrome/browser/custom_handlers/protocol_handler_registry.cc (right): http://codereview.chromium.org/10139002/diff/11002/chrome/browser/custom_handlers/protocol_handler_registry.cc#newcode46 chrome/browser/custom_handlers/protocol_handler_registry.cc:46: ProtocolHandler mail_handler = ...
8 years, 8 months ago (2012-04-23 18:03:53 UTC) #9
Mr4D (OOO till 08-26)
Forgotten to mark this as done in the CL http://codereview.chromium.org/10139002/diff/11002/chrome/browser/custom_handlers/protocol_handler_registry.cc File chrome/browser/custom_handlers/protocol_handler_registry.cc (right): http://codereview.chromium.org/10139002/diff/11002/chrome/browser/custom_handlers/protocol_handler_registry.cc#newcode49 chrome/browser/custom_handlers/protocol_handler_registry.cc:49: ...
8 years, 8 months ago (2012-04-23 18:06:21 UTC) #10
koz (OOO until 15th September)
http://codereview.chromium.org/10139002/diff/21001/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc File chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc (right): http://codereview.chromium.org/10139002/diff/21001/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc#newcode538 chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc:538: #if defined (OS_CHROMEOS) The tests now require a lot ...
8 years, 8 months ago (2012-04-24 00:52:29 UTC) #11
Mr4D (OOO till 08-26)
Changed again - moved and addressed. Please have another look. http://codereview.chromium.org/10139002/diff/21001/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc File chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc (right): http://codereview.chromium.org/10139002/diff/21001/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc#newcode538 ...
8 years, 8 months ago (2012-04-24 15:53:31 UTC) #12
benwells
http://codereview.chromium.org/10139002/diff/29001/chrome/browser/custom_handlers/protocol_handler_registry.h File chrome/browser/custom_handlers/protocol_handler_registry.h (right): http://codereview.chromium.org/10139002/diff/29001/chrome/browser/custom_handlers/protocol_handler_registry.h#newcode286 chrome/browser/custom_handlers/protocol_handler_registry.h:286: bool is_loaded_; Why is this necessary? http://codereview.chromium.org/10139002/diff/29001/chrome/browser/platform_util_chromeos.cc File chrome/browser/platform_util_chromeos.cc ...
8 years, 8 months ago (2012-04-26 00:34:41 UTC) #13
Mr4D (OOO till 08-26)
Addressed. Please have another look! http://codereview.chromium.org/10139002/diff/29001/chrome/browser/custom_handlers/protocol_handler_registry.h File chrome/browser/custom_handlers/protocol_handler_registry.h (right): http://codereview.chromium.org/10139002/diff/29001/chrome/browser/custom_handlers/protocol_handler_registry.h#newcode286 chrome/browser/custom_handlers/protocol_handler_registry.h:286: bool is_loaded_; It is ...
8 years, 8 months ago (2012-04-26 13:46:35 UTC) #14
DaveMoore
http://codereview.chromium.org/10139002/diff/35001/chrome/browser/custom_handlers/protocol_handler_registry.cc File chrome/browser/custom_handlers/protocol_handler_registry.cc (right): http://codereview.chromium.org/10139002/diff/35001/chrome/browser/custom_handlers/protocol_handler_registry.cc#newcode598 chrome/browser/custom_handlers/protocol_handler_registry.cc:598: void ProtocolHandlerRegistry::AddFixedHandler(const ProtocolHandler& handler) { The name "Fixed" handler ...
8 years, 8 months ago (2012-04-26 14:45:49 UTC) #15
Mr4D (OOO till 08-26)
Addressed comments. Please have a look again! http://codereview.chromium.org/10139002/diff/35001/chrome/browser/custom_handlers/protocol_handler_registry.cc File chrome/browser/custom_handlers/protocol_handler_registry.cc (right): http://codereview.chromium.org/10139002/diff/35001/chrome/browser/custom_handlers/protocol_handler_registry.cc#newcode598 chrome/browser/custom_handlers/protocol_handler_registry.cc:598: void ProtocolHandlerRegistry::AddFixedHandler(const ...
8 years, 8 months ago (2012-04-26 16:34:37 UTC) #16
DaveMoore
lgtm although benwells should confirm
8 years, 8 months ago (2012-04-27 03:58:07 UTC) #17
benwells
lgtm
8 years, 8 months ago (2012-04-27 04:05:06 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/10139002/42001
8 years, 8 months ago (2012-04-27 13:16:03 UTC) #19
commit-bot: I haz the power
Can't apply patch for file chrome/browser/custom_handlers/protocol_handler_registry.cc. While running patch -p1 --forward --force; patching file chrome/browser/custom_handlers/protocol_handler_registry.cc ...
8 years, 8 months ago (2012-04-27 13:16:07 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/10139002/51001
8 years, 8 months ago (2012-04-27 14:41:23 UTC) #21
commit-bot: I haz the power
Change committed as 134283
8 years, 8 months ago (2012-04-27 16:45:32 UTC) #22
tony
http://codereview.chromium.org/10139002/diff/51001/chrome/browser/custom_handlers/protocol_handler_registry.h File chrome/browser/custom_handlers/protocol_handler_registry.h (right): http://codereview.chromium.org/10139002/diff/51001/chrome/browser/custom_handlers/protocol_handler_registry.h#newcode289 chrome/browser/custom_handlers/protocol_handler_registry.h:289: bool is_loaded_; Nit: has_loaded_ is more grammatically correct. http://codereview.chromium.org/10139002/diff/51001/chrome/browser/profiles/profile_impl.cc ...
8 years, 8 months ago (2012-04-27 22:17:15 UTC) #23
koz (OOO until 15th September)
8 years, 7 months ago (2012-04-30 02:11:25 UTC) #24
http://codereview.chromium.org/10139002/diff/21001/chrome/browser/custom_hand...
File chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
(right):

http://codereview.chromium.org/10139002/diff/21001/chrome/browser/custom_hand...
chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc:538: #if
defined (OS_CHROMEOS)
On 2012/04/24 15:53:31, Mr4D wrote:
> In my opinion the installation of the default protocol handlers belongs into
the
> base (here) because this is the encapsulation of the protocol handlers and
> therefore this location should know about it and others should not. More so
> because as you have pointed out that there are potentially more creators. And
> especially if the only reason is to make the unit tests "cleaner".
> 
> That said - I have changed it as requested (again). I did one change though:
> Since the Load only gets called once I have implemented it the way that the
> installHandler function directly adds the service.

I disagree that the PHR is the class that should be responsible for knowing what
protocol handlers on what platform should be preinstalled, by your own argument.
If the callers of PHR now require #ifdefs to function correctly because of
#ifdefs inside PHR then instead of encapsulating the concern you have pushed it
out to all callers.

Clean unit tests are obviously not the goal, but if a change you make requires
modifications to many tests (especially the addition of #ifdefs) then it is an
indication that you are invalidating many assumptions that code in the wild may
have made.

http://codereview.chromium.org/10139002/diff/35001/chrome/browser/custom_hand...
File chrome/browser/custom_handlers/protocol_handler_registry.cc (right):

http://codereview.chromium.org/10139002/diff/35001/chrome/browser/custom_hand...
chrome/browser/custom_handlers/protocol_handler_registry.cc:598: void
ProtocolHandlerRegistry::AddFixedHandler(const ProtocolHandler& handler) {
On 2012/04/26 16:34:37, Mr4D wrote:
> Done. In deed. The meaning of this has changed due to reviews. :)

No, fixed handler is right. "Default handler" is already a concept in this
class, so with this rename we now have SetDefault() and RemoveDefaultHanlder(),
both of which mean the handler that is invoked by default for a given protocol,
and this, AddDefaultHandler(), which is about registering "pre-installed"
handlers at Load() time.

Perhaps "preinstalled" handlers is a better name than fixed, but we shouldn't
overload the term "default" here.

(Looking at the comment in the final revision "// The installation of any
pre-defined protocol handlers.", maybe "predefined" is a better word?)

Powered by Google App Engine
This is Rietveld 408576698