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

Issue 273026: Make GetLinuxDistro thread-safe. (Closed)

Created:
11 years, 2 months ago by Lei Zhang
Modified:
9 years, 7 months ago
Reviewers:
Evan Martin
CC:
chromium-reviews_googlegroups.com, brettw+cc_chromium.org
Visibility:
Public.

Description

Make GetLinuxDistro thread-safe. BUG=24659 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=28785

Patch Set 1 #

Patch Set 2 : fix typos and such #

Total comments: 4

Patch Set 3 : rename the class to LinuxDistroHelper, so the enum can be LinuxDistroState #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -8 lines) Patch
M base/linux_util.cc View 1 2 4 chunks +61 lines, -8 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lei Zhang
My previous attempt to fix issue 21782 just made things worse. Hopefully this will stop ...
11 years, 2 months ago (2009-10-12 23:31:28 UTC) #1
Evan Martin
LGTM http://codereview.chromium.org/273026/diff/3001/3002 File base/linux_util.cc (right): http://codereview.chromium.org/273026/diff/3001/3002#newcode55 Line 55: DefaultSingletonTraits<LinuxDistroState> >::get(); can this not be: return ...
11 years, 2 months ago (2009-10-12 23:37:07 UTC) #2
Lei Zhang
11 years, 2 months ago (2009-10-13 00:10:17 UTC) #3
http://codereview.chromium.org/273026/diff/3001/3002
File base/linux_util.cc (right):

http://codereview.chromium.org/273026/diff/3001/3002#newcode55
Line 55: DefaultSingletonTraits<LinuxDistroState> >::get();
On 2009/10/12 23:37:07, Evan Martin wrote:
> can this not be:
>    return Singleton<LinuxDistroState>::get();
> ?
> 
> i think the second arg is the default

Done.

http://codereview.chromium.org/273026/diff/3001/3002#newcode86
Line 86: };
On 2009/10/12 23:37:07, Evan Martin wrote:
> For cleanliness, you can put a type on the enum instead of using ints
> everywhere.

Done.

Powered by Google App Engine
This is Rietveld 408576698