| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 DWORD pre_read_size = 0; | 190 DWORD pre_read_size = 0; |
| 191 DWORD pre_read_step_size = kStepSize; | 191 DWORD pre_read_step_size = kStepSize; |
| 192 DWORD pre_read = 1; | 192 DWORD pre_read = 1; |
| 193 | 193 |
| 194 // TODO(chrisha): This path should not be ChromeFrame specific, and it | 194 // TODO(chrisha): This path should not be ChromeFrame specific, and it |
| 195 // should not be hard-coded with 'Google' in the path. Rather, it should | 195 // should not be hard-coded with 'Google' in the path. Rather, it should |
| 196 // use the product name. | 196 // use the product name. |
| 197 base::win::RegKey key(HKEY_CURRENT_USER, L"Software\\Google\\ChromeFrame", | 197 base::win::RegKey key(HKEY_CURRENT_USER, L"Software\\Google\\ChromeFrame", |
| 198 KEY_QUERY_VALUE); | 198 KEY_QUERY_VALUE); |
| 199 if (key.Valid()) { | 199 if (key.Valid()) { |
| 200 key.ReadValueDW(L"PreReadSize", &pre_read_size); | 200 key.ReadValue(L"PreReadSize", &pre_read_size); |
| 201 key.ReadValueDW(L"PreReadStepSize", &pre_read_step_size); | 201 key.ReadValue(L"PreReadStepSize", &pre_read_step_size); |
| 202 key.ReadValueDW(L"PreRead", &pre_read); | 202 key.ReadValue(L"PreRead", &pre_read); |
| 203 key.Close(); | 203 key.Close(); |
| 204 } | 204 } |
| 205 | 205 |
| 206 #if defined(OS_WIN) | 206 #if defined(OS_WIN) |
| 207 #if defined(GOOGLE_CHROME_BUILD) | 207 #if defined(GOOGLE_CHROME_BUILD) |
| 208 // The PreRead experiment is unable to use the standard FieldTrial | 208 // The PreRead experiment is unable to use the standard FieldTrial |
| 209 // mechanism as pre-reading happens in chrome.exe prior to loading | 209 // mechanism as pre-reading happens in chrome.exe prior to loading |
| 210 // chrome.dll. As such, we use a custom approach. If the experiment is | 210 // chrome.dll. As such, we use a custom approach. If the experiment is |
| 211 // running (not expired, and we're running a version of chrome from an | 211 // running (not expired, and we're running a version of chrome from an |
| 212 // appropriate channel) then we look to the registry for the BreakPad/UMA | 212 // appropriate channel) then we look to the registry for the BreakPad/UMA |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 } | 396 } |
| 397 }; | 397 }; |
| 398 | 398 |
| 399 MainDllLoader* MakeMainDllLoader() { | 399 MainDllLoader* MakeMainDllLoader() { |
| 400 #if defined(GOOGLE_CHROME_BUILD) | 400 #if defined(GOOGLE_CHROME_BUILD) |
| 401 return new ChromeDllLoader(); | 401 return new ChromeDllLoader(); |
| 402 #else | 402 #else |
| 403 return new ChromiumDllLoader(); | 403 return new ChromiumDllLoader(); |
| 404 #endif | 404 #endif |
| 405 } | 405 } |
| OLD | NEW |