summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-23 23:04:16 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-23 23:04:16 +0000
commite55378cd7576dd71f40a6922de3a8182ee45bdeb (patch)
tree0a6e595de4f72aa0aea6719ab1af583d9b6317f3 /chrome/installer/util
parent643392dea6e2a3d07e4451e3bcb07650fa941dad (diff)
downloadchromium_src-e55378cd7576dd71f40a6922de3a8182ee45bdeb.zip
chromium_src-e55378cd7576dd71f40a6922de3a8182ee45bdeb.tar.gz
chromium_src-e55378cd7576dd71f40a6922de3a8182ee45bdeb.tar.bz2
Windows: Add --organic flag to simulate an organic install for testing purposes.
BUG=none TEST=run with --organic --first-run Review URL: http://codereview.chromium.org/3047011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53546 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util')
-rw-r--r--chrome/installer/util/google_update_settings.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/installer/util/google_update_settings.cc b/chrome/installer/util/google_update_settings.cc
index d7ffe99..36f6f1d 100644
--- a/chrome/installer/util/google_update_settings.cc
+++ b/chrome/installer/util/google_update_settings.cc
@@ -1,12 +1,14 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/installer/util/google_update_settings.h"
+#include "base/command_line.h"
#include "base/registry.h"
#include "base/string_util.h"
#include "base/time.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/google_update_constants.h"
#include "chrome/installer/util/install_util.h"
@@ -240,6 +242,10 @@ std::wstring GoogleUpdateSettings::GetNewGoogleUpdateApKey(
}
bool GoogleUpdateSettings::IsOrganic(const std::wstring& brand) {
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch(switches::kOrganicInstall))
+ return true;
+
static const wchar_t* kBrands[] = {
L"CHFO", L"CHFT", L"CHHS", L"CHHM", L"CHMA", L"CHMB", L"CHME", L"CHMF",
L"CHMG", L"CHMH", L"CHMI", L"CHMQ", L"CHMV", L"CHNB", L"CHNC", L"CHNG",