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

Side by Side Diff: chrome_frame/dll_redirector.cc

Issue 5905006: Revert 69490 - base/version: remove wstring version... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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/common/extensions/extension.cc ('k') | webkit/glue/plugins/plugin_group.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_frame/dll_redirector.h" 5 #include "chrome_frame/dll_redirector.h"
6 6
7 #include <aclapi.h> 7 #include <aclapi.h>
8 #include <atlbase.h> 8 #include <atlbase.h>
9 #include <atlsecurity.h> 9 #include <atlsecurity.h>
10 #include <sddl.h> 10 #include <sddl.h>
11 11
12 #include "base/file_path.h" 12 #include "base/file_path.h"
13 #include "base/file_version_info.h" 13 #include "base/file_version_info.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/path_service.h" 15 #include "base/path_service.h"
16 #include "base/shared_memory.h" 16 #include "base/shared_memory.h"
17 #include "base/string_util.h"
18 #include "base/sys_info.h" 17 #include "base/sys_info.h"
19 #include "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
20 #include "base/version.h" 19 #include "base/version.h"
21 #include "chrome_frame/utils.h" 20 #include "chrome_frame/utils.h"
22 21
23 const wchar_t kSharedMemoryName[] = L"ChromeFrameVersionBeacon_"; 22 const wchar_t kSharedMemoryName[] = L"ChromeFrameVersionBeacon_";
24 const uint32 kSharedMemorySize = 128; 23 const uint32 kSharedMemorySize = 128;
25 const uint32 kSharedMemoryLockTimeoutMs = 1000; 24 const uint32 kSharedMemoryLockTimeoutMs = 1000;
26 25
27 // static 26 // static
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 240 }
242 241
243 Version* DllRedirector::GetCurrentModuleVersion() { 242 Version* DllRedirector::GetCurrentModuleVersion() {
244 scoped_ptr<FileVersionInfo> file_version_info( 243 scoped_ptr<FileVersionInfo> file_version_info(
245 FileVersionInfo::CreateFileVersionInfoForCurrentModule()); 244 FileVersionInfo::CreateFileVersionInfoForCurrentModule());
246 DCHECK(file_version_info.get()); 245 DCHECK(file_version_info.get());
247 246
248 Version* current_version = NULL; 247 Version* current_version = NULL;
249 if (file_version_info.get()) { 248 if (file_version_info.get()) {
250 current_version = Version::GetVersionFromString( 249 current_version = Version::GetVersionFromString(
251 WideToASCII(file_version_info->file_version())); 250 file_version_info->file_version());
252 DCHECK(current_version); 251 DCHECK(current_version);
253 } 252 }
254 253
255 return current_version; 254 return current_version;
256 } 255 }
257 256
258 HMODULE DllRedirector::GetFirstModule() { 257 HMODULE DllRedirector::GetFirstModule() {
259 DCHECK(dll_version_.get()) 258 DCHECK(dll_version_.get())
260 << "Error: Did you call RegisterAsFirstCFModule() first?"; 259 << "Error: Did you call RegisterAsFirstCFModule() first?";
261 260
(...skipping 20 matching lines...) Expand all
282 .Append(module_name); 281 .Append(module_name);
283 282
284 HMODULE hmodule = LoadLibrary(module_path.value().c_str()); 283 HMODULE hmodule = LoadLibrary(module_path.value().c_str());
285 if (hmodule == NULL) { 284 if (hmodule == NULL) {
286 DPLOG(ERROR) << "Could not load reported module version " 285 DPLOG(ERROR) << "Could not load reported module version "
287 << version->GetString(); 286 << version->GetString();
288 } 287 }
289 288
290 return hmodule; 289 return hmodule;
291 } 290 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | webkit/glue/plugins/plugin_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698