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

Issue 256022: Loads local resources from current locale subtree if available, if not it fal... (Closed)

Created:
11 years, 2 months ago by Nebojša Ćirić
Modified:
9 years, 7 months ago
Reviewers:
Aaron Boodman
CC:
chromium-reviews_googlegroups.com, Erik does not do reviews, Paweł Hajdan Jr., pam+watch_chromium.org, tim (not reviewing), ben+cc_chromium.org
Visibility:
Public.

Description

Loads local resources from current locale subtree if available, if not it falls back to extension subtree. We look for ext_root/foo/bar.js under ext_root/_locales/fr/foo/bar.js if current locale is fr. If there is no fr specific resource we load ext_root/foo/bar.js instead. Lots of small refactoring to replace FilePath with ExtensionResource. BUG=12131 TEST=See unittest for sample tree.

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 6

Patch Set 4 : '' #

Total comments: 22

Patch Set 5 : '' #

Total comments: 1

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+404 lines, -515 lines) Patch
M chrome/browser/extensions/crx_installer.cc View 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/execute_code_in_tab_function.h View 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/extensions/execute_code_in_tab_function.cc View 3 4 5 3 chunks +6 lines, -6 lines 0 comments Download
MM chrome/browser/extensions/extension_disabled_infobar_delegate.cc View 3 4 5 4 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_file_util.cc View 3 4 5 5 chunks +9 lines, -7 lines 0 comments Download
M chrome/browser/extensions/extension_l10n_util.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_l10n_util.cc View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_l10n_util_unittest.cc View 1 2 3 4 5 2 chunks +31 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_protocols.cc View 3 4 5 3 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extensions_service_unittest.cc View 3 4 5 1 chunk +6 lines, -12 lines 0 comments Download
M chrome/browser/extensions/extensions_ui.cc View 3 4 5 2 chunks +7 lines, -11 lines 0 comments Download
A + chrome/browser/extensions/file_reader.h View 2 chunks +10 lines, -9 lines 0 comments Download
A + chrome/browser/extensions/file_reader.cc View 4 2 chunks +5 lines, -4 lines 0 comments Download
A + chrome/browser/extensions/file_reader_unittest.cc View 4 chunks +8 lines, -3 lines 0 comments Download
A + chrome/browser/extensions/image_loading_tracker.h View 3 chunks +8 lines, -6 lines 0 comments Download
A + chrome/browser/extensions/image_loading_tracker.cc View 4 6 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/extensions/user_script_master.cc View 3 4 5 2 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/gtk/location_bar_view_gtk.h View 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/gtk/location_bar_view_gtk.cc View 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/image_loading_tracker.h View 3 4 5 1 chunk +0 lines, -72 lines 0 comments Download
M chrome/browser/image_loading_tracker.cc View 3 4 5 1 chunk +0 lines, -114 lines 0 comments Download
M chrome/browser/net/file_reader.h View 3 4 5 1 chunk +0 lines, -39 lines 0 comments Download
M chrome/browser/net/file_reader.cc View 3 4 5 1 chunk +0 lines, -32 lines 0 comments Download
M chrome/browser/net/file_reader_unittest.cc View 3 4 5 1 chunk +0 lines, -92 lines 0 comments Download
M chrome/browser/views/browser_actions_container.cc View 3 4 5 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/views/location_bar_view.h View 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/views/location_bar_view.cc View 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M chrome/chrome.gyp View 3 4 5 7 chunks +8 lines, -5 lines 0 comments Download
M chrome/common/extensions/extension.h View 3 4 5 3 chunks +9 lines, -9 lines 0 comments Download
M chrome/common/extensions/extension.cc View 1 2 3 4 5 6 chunks +13 lines, -39 lines 0 comments Download
A chrome/common/extensions/extension_resource.h View 3 4 5 1 chunk +49 lines, -0 lines 0 comments Download
A chrome/common/extensions/extension_resource.cc View 3 4 1 chunk +100 lines, -0 lines 0 comments Download
A chrome/common/extensions/extension_resource_unittest.cc View 3 4 5 1 chunk +60 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_unittest.cc View 3 4 5 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/common/extensions/user_script.h View 3 4 5 3 chunks +10 lines, -7 lines 0 comments Download
M chrome/common/extensions/user_script_unittest.cc View 4 5 1 chunk +6 lines, -3 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Nebojša Ćirić
11 years, 2 months ago (2009-10-01 01:04:40 UTC) #1
Aaron Boodman
GetResourcePath() is used in several places on the UI thread. We cannot call file_util::PathExists inside ...
11 years, 2 months ago (2009-10-01 03:17:01 UTC) #2
Nebojša Ćirić
I was afraid something like this would happen since it looked too simple :). Ok, ...
11 years, 2 months ago (2009-10-01 15:48:58 UTC) #3
Nebojša Ćirić
Ready for another pass. On 2009/10/01 15:48:58, Nebojša Ćirić wrote: > I was afraid something ...
11 years, 2 months ago (2009-10-05 22:28:55 UTC) #4
Aaron Boodman
http://codereview.chromium.org/256022/diff/6001/6026 File chrome/browser/net/file_reader.h (right): http://codereview.chromium.org/256022/diff/6001/6026#newcode24 Line 24: FileReader(const ExtensionResource& resource, Callback* callback); You cannot refer ...
11 years, 2 months ago (2009-10-06 01:54:41 UTC) #5
Nebojša Ćirić
I just have 2 questions (agree on everything else): 1. how is chrome/browser/net/ the same ...
11 years, 2 months ago (2009-10-06 16:37:57 UTC) #6
Aaron Boodman
On 2009/10/06 16:37:57, Nebojša Ćirić wrote: > I just have 2 questions (agree on everything ...
11 years, 2 months ago (2009-10-06 16:59:32 UTC) #7
Aaron Boodman
On 2009/10/06 16:37:57, Nebojša Ćirić wrote: > I just have 2 questions (agree on everything ...
11 years, 2 months ago (2009-10-06 17:10:12 UTC) #8
Nebojša Ćirić
All done. On 2009/10/06 17:10:12, Aaron Boodman wrote: > On 2009/10/06 16:37:57, Nebojša Ćirić wrote: ...
11 years, 2 months ago (2009-10-06 22:35:02 UTC) #9
Aaron Boodman
http://codereview.chromium.org/256022/diff/3003/9081 File chrome/browser/extensions/crx_installer.cc (right): http://codereview.chromium.org/256022/diff/3003/9081#newcode128 Line 128: extension_->GetIconPath(Extension::EXTENSION_ICON_LARGE) Nit: this line should be indented two ...
11 years, 2 months ago (2009-10-06 23:09:05 UTC) #10
Nebojša Ćirić
http://codereview.chromium.org/256022/diff/3003/9081 File chrome/browser/extensions/crx_installer.cc (right): http://codereview.chromium.org/256022/diff/3003/9081#newcode128 Line 128: extension_->GetIconPath(Extension::EXTENSION_ICON_LARGE) On 2009/10/06 23:09:05, Aaron Boodman wrote: > ...
11 years, 2 months ago (2009-10-07 00:40:24 UTC) #11
Aaron Boodman
11 years, 2 months ago (2009-10-07 17:47:27 UTC) #12
lgtm

http://codereview.chromium.org/256022/diff/3003/9081
File chrome/browser/extensions/crx_installer.cc (right):

http://codereview.chromium.org/256022/diff/3003/9081#newcode128
Line 128: extension_->GetIconPath(Extension::EXTENSION_ICON_LARGE)
On 2009/10/07 00:40:24, Nebojša Ćirić wrote:
> On 2009/10/06 23:09:05, Aaron Boodman wrote:
> > Nit: this line should be indented two more (and same with one below).
> 
> Hm, I always (at least in google3) indented 2 spaces after = and 4 for
function
> parameter.
> 
> Done.
> 

Oh, maybe I am wrong then. This is how I've always done it in Chromium, but to
be honest, the google3 indent rules are a little baroque in my opinion. I
wouldn't be surprised if I misunderstood them.

http://codereview.chromium.org/256022/diff/3003/9099
File chrome/common/extensions/extension_resource.h (right):

http://codereview.chromium.org/256022/diff/3003/9099#newcode24
Line 24: // Might hit filesystem. Do not call on UI thread!
On 2009/10/07 00:40:24, Nebojša Ćirić wrote:
> On 2009/10/06 23:09:05, Aaron Boodman wrote:
> > Can you put some stars and capital letters around this :).
> 
> Done.

Perfect, thanks :)

http://codereview.chromium.org/256022/diff/11002/12004
File chrome/browser/extensions/extension_l10n_util_unittest.cc (right):

http://codereview.chromium.org/256022/diff/11002/12004#newcode147
Line 147: bool PathsAreEqual(const FilePath& path, const FilePath& result) {
You didn't change this second argument name to path2.

Powered by Google App Engine
This is Rietveld 408576698