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

Issue 18352: Miscellaneous changes to Extension class in prep for user scripts (Closed)

Created:
11 years, 11 months ago by Aaron Boodman
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Parse more user script info out of the manifest and expose it on the Extension class. Removed Extension::CopyToValue() because it was only being used in unit tests. Centralize functions for creation of absolute URLs and paths to extension resources in Extension class and move corresponding unit tests. Various other minor nitpickery.

Patch Set 1 #

Patch Set 2 : Some changes #

Patch Set 3 : Fix minor typos #

Patch Set 4 : Move UserScriptInfo into UserScriptMaster #

Total comments: 26

Patch Set 5 : Review feedback #

Patch Set 6 : This time without the oops #

Total comments: 1

Patch Set 7 : DCHECK that incoming path is absolute. #

Patch Set 8 : fix typo #

Patch Set 9 : be more paranoid about accessing string indexes than is probably warranted #

Unified diffs Side-by-side diffs Delta from patch set Stats (+436 lines, -227 lines) Patch
M chrome/browser/extensions/extension.h View 1 2 3 4 4 chunks +50 lines, -22 lines 0 comments Download
M chrome/browser/extensions/extension.cc View 1 2 3 4 5 6 7 8 3 chunks +179 lines, -55 lines 0 comments Download
M chrome/browser/extensions/extension_protocols.h View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_protocols.cc View 4 chunks +3 lines, -40 lines 0 comments Download
M chrome/browser/extensions/extension_protocols_unittest.cc View 1 chunk +0 lines, -33 lines 0 comments Download
M chrome/browser/extensions/extension_unittest.cc View 1 1 chunk +171 lines, -55 lines 0 comments Download
M chrome/browser/extensions/extensions_service_unittest.cc View 1 2 3 4 chunks +16 lines, -8 lines 0 comments Download
M chrome/browser/extensions/user_script_master.h View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/extension1/manifest View 1 chunk +9 lines, -3 lines 0 comments Download
M chrome/test/unit/unit_tests.scons View 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M chrome/test/unit/unittests.vcproj View 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Aaron Boodman
11 years, 11 months ago (2009-01-20 02:32:27 UTC) #1
Erik does not do reviews
http://codereview.chromium.org/18352/diff/30/31 File chrome/browser/extensions/extension.cc (right): http://codereview.chromium.org/18352/diff/30/31#newcode14 Line 14: const wchar_t* Extension::kFormatVersionKey = L"format_version"; please alphabetize http://codereview.chromium.org/18352/diff/30/31#newcode26 ...
11 years, 11 months ago (2009-01-20 21:32:03 UTC) #2
Aaron Boodman
Ready for another look. I'll fix the ReplaceSubstrings() thing separately in a different CL that ...
11 years, 11 months ago (2009-01-20 23:11:04 UTC) #3
Erik does not do reviews
11 years, 11 months ago (2009-01-20 23:22:27 UTC) #4
LGTM

http://codereview.chromium.org/18352/diff/30/37
File chrome/browser/extensions/extensions_service.cc (right):

http://codereview.chromium.org/18352/diff/30/37#newcode66
Line 66: printf("%s\n", error.c_str());
On 2009/01/20 23:11:04, Aaron Boodman wrote:
> On 2009/01/20 21:32:03, Erik Kay wrote:
> > Did you mean to check this in?
> 
> No fixed. I was desperately trying to find some way to see this output. This
> didn't work either :(

strange.  Is the LOG(WARNING) not working still the case?  I recently checked in
a fix where unit tests should all be initializing logging properly now.

http://codereview.chromium.org/18352/diff/60/242
File chrome/browser/extensions/extension.cc (right):

http://codereview.chromium.org/18352/diff/60/242#newcode133
Line 133: DCHECK(path_str.size() >= 2 && path_str[1] == L':');
Instead use path.IsAbsolute().  It also handles UNC paths.

Powered by Google App Engine
This is Rietveld 408576698