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

Side by Side Diff: chrome/common/chrome_version_info.cc

Issue 4222005: Turn on file access checks on Win. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Second try Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/themes/browser_theme_pack.cc ('k') | net/base/ssl_config_service_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/chrome_version_info.h" 5 #include "chrome/common/chrome_version_info.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_version_info.h" 8 #include "base/file_version_info.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/thread_restrictions.h"
10 #include "build/build_config.h" 11 #include "build/build_config.h"
11 12
12 namespace chrome { 13 namespace chrome {
13 14
14 #if defined(OS_WIN) || defined(OS_MACOSX) 15 #if defined(OS_WIN) || defined(OS_MACOSX)
15 // On Windows and Mac, we get the Chrome version info by querying 16 // On Windows and Mac, we get the Chrome version info by querying
16 // FileVersionInfo for the current module. 17 // FileVersionInfo for the current module.
17 18
18 VersionInfo::VersionInfo() { 19 VersionInfo::VersionInfo() {
20 // The current module is already loaded in memory, so this will be cheap.
21 base::ThreadRestrictions::ScopedAllowIO allow_io;
19 version_info_.reset(FileVersionInfo::CreateFileVersionInfoForCurrentModule()); 22 version_info_.reset(FileVersionInfo::CreateFileVersionInfoForCurrentModule());
20 } 23 }
21 24
22 VersionInfo::~VersionInfo() { 25 VersionInfo::~VersionInfo() {
23 } 26 }
24 27
25 bool VersionInfo::is_valid() const { 28 bool VersionInfo::is_valid() const {
26 return version_info_.get() != NULL; 29 return version_info_.get() != NULL;
27 } 30 }
28 31
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 return LAST_CHANGE; 81 return LAST_CHANGE;
79 } 82 }
80 83
81 bool VersionInfo::IsOfficialBuild() const { 84 bool VersionInfo::IsOfficialBuild() const {
82 return OFFICIAL_BUILD; 85 return OFFICIAL_BUILD;
83 } 86 }
84 87
85 #endif 88 #endif
86 89
87 } // namespace chrome 90 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/themes/browser_theme_pack.cc ('k') | net/base/ssl_config_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698