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

Side by Side Diff: chrome/app/metro_driver_win.cc

Issue 94013004: Add base:: to string16s in chrome/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try again Created 7 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/app/client_util.cc ('k') | chrome/installer/gcapi/gcapi_last_run_test.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "metro_driver_win.h" 5 #include "metro_driver_win.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "chrome/app/client_util.h" 9 #include "chrome/app/client_util.h"
10 #include "chrome/common/chrome_constants.h" 10 #include "chrome/common/chrome_constants.h"
(...skipping 28 matching lines...) Expand all
39 return; 39 return;
40 } 40 }
41 // We haven't tried to load the metro driver, this probably means we are the 41 // We haven't tried to load the metro driver, this probably means we are the
42 // browser. Find it or not we set the environment variable because we don't 42 // browser. Find it or not we set the environment variable because we don't
43 // want to keep trying in the child processes. 43 // want to keep trying in the child processes.
44 HMODULE metro_dll = ::LoadLibraryW(chrome::kMetroDriverDll); 44 HMODULE metro_dll = ::LoadLibraryW(chrome::kMetroDriverDll);
45 if (!metro_dll) { 45 if (!metro_dll) {
46 // It is not next to the build output, so this must be an actual deployment 46 // It is not next to the build output, so this must be an actual deployment
47 // and in that case we need the mainloader to find the current version 47 // and in that case we need the mainloader to find the current version
48 // directory. 48 // directory.
49 string16 version(GetCurrentModuleVersion()); 49 base::string16 version(GetCurrentModuleVersion());
50 if (!version.empty()) { 50 if (!version.empty()) {
51 std::wstring exe_path(GetExecutablePath()); 51 std::wstring exe_path(GetExecutablePath());
52 exe_path.append(version).append(L"\\").append(chrome::kMetroDriverDll); 52 exe_path.append(version).append(L"\\").append(chrome::kMetroDriverDll);
53 metro_dll = ::LoadLibraryW(exe_path.c_str()); 53 metro_dll = ::LoadLibraryW(exe_path.c_str());
54 } 54 }
55 } 55 }
56 // We set the environment variable always, so we don't keep trying in 56 // We set the environment variable always, so we don't keep trying in
57 // the child processes. 57 // the child processes.
58 ::SetEnvironmentVariableA(kMetroModeEnvVar, metro_dll ? "1" : "0"); 58 ::SetEnvironmentVariableA(kMetroModeEnvVar, metro_dll ? "1" : "0");
59 if (!metro_dll) 59 if (!metro_dll)
60 return; 60 return;
61 init_metro_fn_ = ::GetProcAddress(metro_dll, "InitMetro"); 61 init_metro_fn_ = ::GetProcAddress(metro_dll, "InitMetro");
62 } 62 }
63 63
64 int MetroDriver::RunInMetro(HINSTANCE instance, MainFn main_fn) { 64 int MetroDriver::RunInMetro(HINSTANCE instance, MainFn main_fn) {
65 Context* context = new Context; 65 Context* context = new Context;
66 context->fn = main_fn; 66 context->fn = main_fn;
67 context->instance = instance; 67 context->instance = instance;
68 68
69 return reinterpret_cast<InitMetro>(init_metro_fn_)(&MainThread, context); 69 return reinterpret_cast<InitMetro>(init_metro_fn_)(&MainThread, context);
70 } 70 }
OLDNEW
« no previous file with comments | « chrome/app/client_util.cc ('k') | chrome/installer/gcapi/gcapi_last_run_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698