OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <windows.h> | 5 #include <windows.h> |
6 #include <shlwapi.h> | 6 #include <shlwapi.h> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/environment.h" | 10 #include "base/environment.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 123 |
124 base::win::RegKey key(HKEY_CURRENT_USER, L"Software\\Google\\ChromeFrame", | 124 base::win::RegKey key(HKEY_CURRENT_USER, L"Software\\Google\\ChromeFrame", |
125 KEY_QUERY_VALUE); | 125 KEY_QUERY_VALUE); |
126 if (key.Valid()) { | 126 if (key.Valid()) { |
127 key.ReadValueDW(L"PreReadSize", &pre_read_size); | 127 key.ReadValueDW(L"PreReadSize", &pre_read_size); |
128 key.ReadValueDW(L"PreReadStepSize", &pre_read_step_size); | 128 key.ReadValueDW(L"PreReadStepSize", &pre_read_step_size); |
129 key.ReadValueDW(L"PreRead", &pre_read); | 129 key.ReadValueDW(L"PreRead", &pre_read); |
130 key.Close(); | 130 key.Close(); |
131 } | 131 } |
132 if (pre_read) { | 132 if (pre_read) { |
133 TRACE_EVENT_BEGIN("PreReadImage", 0, ""); | 133 TRACE_EVENT_BEGIN_ETW("PreReadImage", 0, ""); |
134 file_util::PreReadImage(dir->c_str(), pre_read_size, pre_read_step_size); | 134 file_util::PreReadImage(dir->c_str(), pre_read_size, pre_read_step_size); |
135 TRACE_EVENT_END("PreReadImage", 0, ""); | 135 TRACE_EVENT_END_ETW("PreReadImage", 0, ""); |
136 } | 136 } |
137 } | 137 } |
138 #endif // NDEBUG | 138 #endif // NDEBUG |
139 | 139 |
140 return ::LoadLibraryExW(dir->c_str(), NULL, | 140 return ::LoadLibraryExW(dir->c_str(), NULL, |
141 LOAD_WITH_ALTERED_SEARCH_PATH); | 141 LOAD_WITH_ALTERED_SEARCH_PATH); |
142 } | 142 } |
143 | 143 |
144 // Set did_run "dr" to |value| in Google Update's client state key for the | 144 // Set did_run "dr" to |value| in Google Update's client state key for the |
145 // product associated with |dist|, creating the client state key if necessary. | 145 // product associated with |dist|, creating the client state key if necessary. |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 } | 343 } |
344 }; | 344 }; |
345 | 345 |
346 MainDllLoader* MakeMainDllLoader() { | 346 MainDllLoader* MakeMainDllLoader() { |
347 #if defined(GOOGLE_CHROME_BUILD) | 347 #if defined(GOOGLE_CHROME_BUILD) |
348 return new ChromeDllLoader(); | 348 return new ChromeDllLoader(); |
349 #else | 349 #else |
350 return new ChromiumDllLoader(); | 350 return new ChromiumDllLoader(); |
351 #endif | 351 #endif |
352 } | 352 } |
OLD | NEW |