summaryrefslogtreecommitdiffstats
path: root/base/sys_info_chromeos.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-23 05:19:20 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-23 05:19:20 +0000
commitba74b0d2f492a1a7a310af5e69fa7a0812ce6f52 (patch)
treeeacff9788a950e58118148b5cae3f236840a49b0 /base/sys_info_chromeos.cc
parent3c24a4682e05dc4496c0a9d898872ac39d142817 (diff)
downloadchromium_src-ba74b0d2f492a1a7a310af5e69fa7a0812ce6f52.zip
chromium_src-ba74b0d2f492a1a7a310af5e69fa7a0812ce6f52.tar.gz
chromium_src-ba74b0d2f492a1a7a310af5e69fa7a0812ce6f52.tar.bz2
Thread IO safety: annotate file_util, and block IO thread from doing IO
- Mark functions in file_util_posix as requiring permission to perform disk actions. - Mark the IO thread as disallowed from performing disk actions. - Temporarily work around the protections in places where we currently have bugs. BUG=59847,59849,60207,60211,60394 TEST=no dchecks in debug builds Review URL: http://codereview.chromium.org/3872002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63636 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/sys_info_chromeos.cc')
-rw-r--r--base/sys_info_chromeos.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/sys_info_chromeos.cc b/base/sys_info_chromeos.cc
index fec2696..e554d73 100644
--- a/base/sys_info_chromeos.cc
+++ b/base/sys_info_chromeos.cc
@@ -9,6 +9,7 @@
#include "base/file_util.h"
#include "base/string_number_conversions.h"
#include "base/string_tokenizer.h"
+#include "base/thread_restrictions.h"
namespace base {
@@ -24,6 +25,12 @@ const char kLinuxStandardBaseReleaseFile[] = "/etc/lsb-release";
void SysInfo::OperatingSystemVersionNumbers(int32 *major_version,
int32 *minor_version,
int32 *bugfix_version) {
+ // The other implementations of SysInfo don't block on the disk.
+ // See http://code.google.com/p/chromium/issues/detail?id=60394
+ // Perhaps the caller ought to cache this?
+ // Temporary allowing while we work the bug out.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+
// TODO(cmasone): If this gets called a lot, it may kill performance.
// consider using static variables to cache these values?
FilePath path(kLinuxStandardBaseReleaseFile);