Chromium Code Reviews

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

Issue 345021: Continue to remove CHROME_FRAME_BUILD define from code that goes into chrome.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/first_run_win.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/app/breakpad_win.h" 8 #include "chrome/app/breakpad_win.h"
9 #include "chrome/app/client_util.h" 9 #include "chrome/app/client_util.h"
10 #include "chrome/common/result_codes.h" 10 #include "chrome/common/result_codes.h"
11 #include "chrome/installer/util/browser_distribution.h"
11 #include "chrome/installer/util/install_util.h" 12 #include "chrome/installer/util/install_util.h"
12 #include "chrome/installer/util/google_update_constants.h" 13 #include "chrome/installer/util/google_update_constants.h"
13 #include "chrome/installer/util/util_constants.h" 14 #include "chrome/installer/util/util_constants.h"
14 15
15 namespace { 16 namespace {
16 // The entry point signature of chrome.dll. 17 // The entry point signature of chrome.dll.
17 typedef int (*DLL_MAIN)(HINSTANCE, sandbox::SandboxInterfaceInfo*, wchar_t*); 18 typedef int (*DLL_MAIN)(HINSTANCE, sandbox::SandboxInterfaceInfo*, wchar_t*);
18 19
19 // Not generic, we only handle strings up to 128 chars. 20 // Not generic, we only handle strings up to 128 chars.
20 bool ReadRegistryStr(HKEY key, const wchar_t* name, std::wstring* value) { 21 bool ReadRegistryStr(HKEY key, const wchar_t* name, std::wstring* value) {
(...skipping 147 matching lines...)
168 169
169 return entry_point(instance, sbox_info, ::GetCommandLineW()); 170 return entry_point(instance, sbox_info, ::GetCommandLineW());
170 } 171 }
171 172
172 //============================================================================= 173 //=============================================================================
173 174
174 class ChromeDllLoader : public MainDllLoader { 175 class ChromeDllLoader : public MainDllLoader {
175 public: 176 public:
176 virtual std::wstring GetRegistryPath() { 177 virtual std::wstring GetRegistryPath() {
177 std::wstring key(google_update::kRegPathClients); 178 std::wstring key(google_update::kRegPathClients);
178 key.append(L"\\").append(google_update::kChromeGuid); 179 key.append(L"\\").append(google_update::kChromeGuid);
kuchhal 2009/11/04 20:55:08 You probably need to change this too, to pick up C
robertshield 2009/11/04 22:15:39 kChromeGuid is defined in a generated header that
179 return key; 180 return key;
180 } 181 }
181 182
182 virtual void OnBeforeLaunch(const std::wstring& version) { 183 virtual void OnBeforeLaunch(const std::wstring& version) {
183 RecordDidRun(google_update::kChromeGuid); 184 RecordDidRun(google_update::kChromeGuid);
184 } 185 }
185 }; 186 };
186 187
187 //============================================================================= 188 //=============================================================================
188 189
189 class ChromiumDllLoader : public MainDllLoader { 190 class ChromiumDllLoader : public MainDllLoader {
190 public: 191 public:
191 virtual std::wstring GetRegistryPath() { 192 virtual std::wstring GetRegistryPath() {
192 return L"Software\\Chromium"; 193 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
194 return dist->GetVersionKey();
193 } 195 }
194 }; 196 };
195 197
196 MainDllLoader* MakeMainDllLoader() { 198 MainDllLoader* MakeMainDllLoader() {
197 #if defined(GOOGLE_CHROME_BUILD) 199 #if defined(GOOGLE_CHROME_BUILD)
198 return new ChromeDllLoader(); 200 return new ChromeDllLoader();
199 #else 201 #else
200 return new ChromiumDllLoader(); 202 return new ChromiumDllLoader();
201 #endif 203 #endif
202 } 204 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/first_run_win.cc » ('j') | no next file with comments »

Powered by Google App Engine