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

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

Issue 8344004: base/win: Add documentation to RegKey::Read/Write functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix indentation Created 9 years, 2 months 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
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698