summaryrefslogtreecommitdiffstats
path: root/chrome/browser/shell_integration.cc
diff options
context:
space:
mode:
authorrahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-18 21:39:43 +0000
committerrahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-18 21:39:43 +0000
commit8bcdcbe8e59f804e03f75e86744211210c64484a (patch)
tree06a04450b42770a59ecab09998608c005fed391d /chrome/browser/shell_integration.cc
parentaf784739ebdc4ca47d9d52e366587e4c7ba2313b (diff)
downloadchromium_src-8bcdcbe8e59f804e03f75e86744211210c64484a.zip
chromium_src-8bcdcbe8e59f804e03f75e86744211210c64484a.tar.gz
chromium_src-8bcdcbe8e59f804e03f75e86744211210c64484a.tar.bz2
First set of changes to start separating Google specific branding from Chromium. This change mostly tries to modify installer to install Chromium or Google Chrome depending on a compile flag. The goal is to try to isolate all the differences in a single class that can be overridden for customization. There is also a lot of refactoring to make this happen.
Some changes are yet to be done but I didn't want to make this change even bigger than it already is. With all these changes the default build should still work as it is (Google Chrome should get installed/uninstalled). The changes yet to be done: - Separating string resources (this is marked by TODO in one of the files) - Generate different chrome.7z (Chromium will not include rlz.dll) for mini_installer BUG=1296800 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@999 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/shell_integration.cc')
-rw-r--r--chrome/browser/shell_integration.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/shell_integration.cc b/chrome/browser/shell_integration.cc
index bd29986..8df4e9d 100644
--- a/chrome/browser/shell_integration.cc
+++ b/chrome/browser/shell_integration.cc
@@ -43,6 +43,7 @@
#include "base/win_util.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/win_util.h"
+#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/create_reg_key_work_item.h"
#include "chrome/installer/util/set_reg_value_work_item.h"
#include "chrome/installer/util/shell_util.h"
@@ -153,7 +154,8 @@ bool ShellIntegration::SetAsDefaultBrowser() {
NULL, CLSCTX_INPROC, __uuidof(IApplicationAssociationRegistration),
(void**)&pAAR);
if (SUCCEEDED(hr)) {
- hr = pAAR->SetAppAsDefaultAll(installer_util::kApplicationName);
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution();
+ hr = pAAR->SetAppAsDefaultAll(dist->GetApplicationName().c_str());
pAAR->Release();
}
if (!SUCCEEDED(hr))
@@ -272,8 +274,9 @@ bool ShellIntegration::IsDefaultBrowser() {
for (int i = 0; i < _countof(kChromeProtocols); i++) {
BOOL result = TRUE;
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution();
hr = pAAR->QueryAppIsDefault(kChromeProtocols[i].c_str(), AT_URLPROTOCOL,
- AL_EFFECTIVE, installer_util::kApplicationName, &result);
+ AL_EFFECTIVE, dist->GetApplicationName().c_str(), &result);
if (!SUCCEEDED(hr) || (result == FALSE)) {
pAAR->Release();
return false;