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

Issue 7778036: ui/gfx: Get rid of a few static variables from NativeTheme* type. (Closed)

Created:
9 years, 3 months ago by tfarina
Modified:
9 years, 3 months ago
Reviewers:
oshima, DaveMoore
CC:
chromium-reviews
Visibility:
Public.

Description

ui/gfx: Get rid of a few static variables from NativeTheme* type. Change them to static pointers initialized lazy. BUG=83856 TEST=None R=davemoore@chromium.org

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : use base::LazyInstance #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -28 lines) Patch
M ui/gfx/native_theme_chromeos.h View 1 2 1 chunk +6 lines, -2 lines 0 comments Download
M ui/gfx/native_theme_chromeos.cc View 1 2 2 chunks +7 lines, -5 lines 0 comments Download
M ui/gfx/native_theme_linux.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M ui/gfx/native_theme_linux.cc View 1 2 3 chunks +14 lines, -11 lines 0 comments Download
M ui/gfx/native_theme_win.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M ui/gfx/native_theme_win.cc View 1 2 2 chunks +5 lines, -3 lines 0 comments Download
M ui/ui.gyp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
tfarina
9 years, 3 months ago (2011-08-31 02:45:37 UTC) #1
DaveMoore
Could you explain why you want to do this? If it's to reduce static initializers, ...
9 years, 3 months ago (2011-08-31 15:53:58 UTC) #2
tfarina
On 2011/08/31 15:53:58, DaveMoore wrote: > Could you explain why you want to do this? ...
9 years, 3 months ago (2011-08-31 19:00:34 UTC) #3
oshima
9 years, 3 months ago (2011-09-01 17:02:50 UTC) #4
Drive by comment.

Does this need to be thread safe? I believe it shouldn't be used by any thread
other than UI thread. If this indeed can be used by multiple threads, you need
to make theme object thread safe (it currently isn't).


On 2011/08/31 19:00:34, tfarina wrote:
> On 2011/08/31 15:53:58, DaveMoore wrote:
> > Could you explain why you want to do this? If it's to reduce static
> > initializers, then this is unnecessary, as function static members already
> don't
> > create static initializers. If it's to move the memory from data pages to
the
> > heap, I'm not sure why that's desirable.
> 
> Maybe there was a change, but the bug reports
> gfx::NativeThemeLinux::instance()::s_native_theme.

Powered by Google App Engine
This is Rietveld 408576698