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

Issue 267051: Minimize dependency of user scripts.... (Closed)

Created:
11 years, 2 months ago by MAD
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, ben+cc_chromium.org, Erik does not do reviews, pam+watch_chromium.org, darin (slow to review), tim (not reviewing)
Visibility:
Public.

Description

Minimize dependency of user scripts. And made some minor lint fixes and code refactoring on the way, based on CR comments of previous attempt. BUG=none TEST=Make sure that the extension resources can still be properly localized and that they also load correctly when they are not localized. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29512

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 9

Patch Set 3 : '' #

Total comments: 7

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 2

Patch Set 8 : '' #

Total comments: 6

Patch Set 9 : '' #

Patch Set 10 : '' #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+246 lines, -86 lines) Patch
M base/file_path.h View 4 5 6 7 8 9 1 chunk +11 lines, -0 lines 2 comments Download
M base/file_path.cc View 4 5 6 7 8 9 2 chunks +69 lines, -2 lines 1 comment Download
M base/file_path_unittest.cc View 4 5 6 7 8 9 2 chunks +94 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_file_util.cc View 4 5 6 7 8 9 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extensions_service_unittest.cc View 4 5 6 7 8 9 1 chunk +9 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extensions_ui.cc View 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/user_script_master.cc View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/common/extensions/extension.cc View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/common/extensions/extension_resource.h View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/common/extensions/extension_resource.cc View 1 2 3 4 5 6 7 8 9 2 chunks +24 lines, -48 lines 0 comments Download
M chrome/common/extensions/user_script.h View 4 5 6 7 8 9 2 chunks +12 lines, -10 lines 0 comments Download
M chrome/common/extensions/user_script_unittest.cc View 4 5 6 7 8 9 1 chunk +6 lines, -6 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
MAD
11 years, 2 months ago (2009-10-12 15:29:24 UTC) #1
Paweł Hajdan Jr.
Drive-by. I added a comment about the temp file because it's easier to debug flakiness ...
11 years, 2 months ago (2009-10-12 15:57:53 UTC) #2
Aaron Boodman
Seems OK to me. You should ping darin or brettw directly and make sure they ...
11 years, 2 months ago (2009-10-12 15:58:54 UTC) #3
MAD
Changes based on initial feedback... And added Brett and Darin to reviewers to validate addition ...
11 years, 2 months ago (2009-10-12 16:58:01 UTC) #4
Paweł Hajdan Jr.
http://codereview.chromium.org/267051/diff/2001/2011 File chrome/browser/extensions/extension_l10n_util_unittest.cc (right): http://codereview.chromium.org/267051/diff/2001/2011#newcode169 Line 169: if (file_util::PathExists(inexistent)) ScopedTempDir should be different for each ...
11 years, 2 months ago (2009-10-12 17:05:56 UTC) #5
Nebojša Ćirić
http://codereview.chromium.org/267051/diff/4001/4009 File chrome/browser/extensions/extension_l10n_util.cc (right): http://codereview.chromium.org/267051/diff/4001/4009#newcode159 Line 159: .Append(relative_resource_path); New line here? http://codereview.chromium.org/267051/diff/4001/4010 File chrome/browser/extensions/extension_l10n_util.h (right): ...
11 years, 2 months ago (2009-10-12 17:16:37 UTC) #6
MAD
Press Pause on your Code Review player... And wait for the next revision (which won't ...
11 years, 2 months ago (2009-10-12 17:41:03 UTC) #7
Aaron Boodman
http://codereview.chromium.org/267051/diff/4001/4005 File chrome/common/extensions/extension.cc (right): http://codereview.chromium.org/267051/diff/4001/4005#newcode441 Line 441: extension_path, FilePath().AppendASCII(trimmed_path)); On 2009/10/12 17:16:37, Nebojša Ćirić wrote: ...
11 years, 2 months ago (2009-10-12 17:46:56 UTC) #8
brettw
> http://codereview.chromium.org/267051/diff/2001/2008#newcode53 > Line 53: // URL encoding and path separator issues. > We should ...
11 years, 2 months ago (2009-10-12 19:35:48 UTC) #9
brettw
To clarify my previous comment (I'll be out most of Tuesday): I don't see what ...
11 years, 2 months ago (2009-10-13 02:57:06 UTC) #10
Aaron Boodman
On 2009/10/13 02:57:06, brettw wrote: > To clarify my previous comment (I'll be out most ...
11 years, 2 months ago (2009-10-13 07:16:20 UTC) #11
MAD
Salut, here's another attempt at resolving the issues identified in the previous version's code review... ...
11 years, 2 months ago (2009-10-14 22:27:19 UTC) #12
MAD
Ping? Thanks! BYE MAD On Wed, Oct 14, 2009 at 6:27 PM, <mad@chromium.org> wrote: > ...
11 years, 2 months ago (2009-10-15 22:30:51 UTC) #13
Nebojša Ćirić
I'll take a look at it on Monday. I am at Unicode conference Wed-Fri this ...
11 years, 2 months ago (2009-10-16 04:50:35 UTC) #14
Aaron Boodman
The extension parts look good to me. Defer to brettw on FilePath change, but it ...
11 years, 2 months ago (2009-10-16 05:24:53 UTC) #15
Nebojša Ćirić
lgtm So, by removing ExtensionResource from UserScript::File you got rid of deps. on app/l10n_util? If ...
11 years, 2 months ago (2009-10-16 22:37:40 UTC) #16
MAD
Added the static method requested by Nebojša... Brett, are you OK with the FilePath changes ...
11 years, 2 months ago (2009-10-19 20:00:05 UTC) #17
brettw
I'm checking the logic right now on the FilePath function. The unit test is very ...
11 years, 2 months ago (2009-10-19 20:39:20 UTC) #18
Nebojša Ćirić
http://codereview.chromium.org/267051/diff/16001/16008 File chrome/browser/extensions/user_script_master.cc (right): http://codereview.chromium.org/267051/diff/16001/16008#newcode141 Line 141: const FilePath& path = resource.GetFilePath(); Use static GetFilePath() ...
11 years, 2 months ago (2009-10-19 21:20:44 UTC) #19
MAD
Adressed Nebojša's comments (thanks for the good tips ;-) And also added support for "." ...
11 years, 2 months ago (2009-10-19 21:41:06 UTC) #20
brettw
Maybe I'm misunderstanding something, but the old GURL code if given "/foo/bar" + "baz" = ...
11 years, 2 months ago (2009-10-19 23:47:24 UTC) #21
MAD
The current usage has to be made with a folder as the path we append ...
11 years, 2 months ago (2009-10-20 00:14:36 UTC) #22
brettw
LGTM, thanks for the patience. http://codereview.chromium.org/267051/diff/19003/19005 File base/file_path.h (right): http://codereview.chromium.org/267051/diff/19003/19005#newcode185 Line 185: // Note that ...
11 years, 2 months ago (2009-10-20 06:06:19 UTC) #23
MAD
Thank YOU for YOUR patience :-) Will commit as soon as I rebuilt and re-ran ...
11 years, 2 months ago (2009-10-20 13:43:28 UTC) #24
Mark Mentovai
The file_path part of this change needs to be backed out. http://codereview.chromium.org/267051/diff/19003/19004 File base/file_path.cc (right): ...
11 years, 2 months ago (2009-10-23 21:29:40 UTC) #25
Aaron Boodman
On Fri, Oct 23, 2009 at 2:29 PM, <mark@chromium.org> wrote: > > The file_path part ...
11 years, 2 months ago (2009-10-23 21:58:41 UTC) #26
MAD
11 years, 2 months ago (2009-10-25 02:57:54 UTC) #27
Salut,

   OK, I could rename it... and I was thinking that doing both the append
and the relative resolution in the same method, might  be a bit too much...
So here is what I would propose...

   We remove the Append call from the method and let the callers do it on
their own. And then, rename the method to "ResolveParentReferences" which is
what we are doing.... This is why we have nothing to do if
"ReferencesParent" returns false...

   Deal?

Thanks!

BYE
MAD

On Fri, Oct 23, 2009 at 5:58 PM, Aaron Boodman <aa@chromium.org> wrote:

> On Fri, Oct 23, 2009 at 2:29 PM,  <mark@chromium.org> wrote:
> >
> > The file_path part of this change needs to be backed out.
> >
> >
> > http://codereview.chromium.org/267051/diff/19003/19004
> > File base/file_path.cc (right):
> >
> > http://codereview.chromium.org/267051/diff/19003/19004#newcode161
> > Line 161: bool FilePath::AppendAndResolveRelative(const FilePath&
> > relative_path,
> > This is wrong and we need to remove it.
> >
> > We can't resolve .. without referencing the disk.  (Think symbolic
> > links.)
>
> We want unresolved symbolic links in this case I think. Maybe
> "resolve" is the wrong name?
>
> - a
>

Powered by Google App Engine
This is Rietveld 408576698