summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-23 22:48:06 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-23 22:48:06 +0000
commit1779ec8be7e19675c4a7f1739ade446ed301997f (patch)
treea217948f79a4920dadcdb249d196838399866815
parentfac2d8ecef147ec0b486fdd453659f28abac3e7a (diff)
downloadchromium_src-1779ec8be7e19675c4a7f1739ade446ed301997f.zip
chromium_src-1779ec8be7e19675c4a7f1739ade446ed301997f.tar.gz
chromium_src-1779ec8be7e19675c4a7f1739ade446ed301997f.tar.bz2
First cut at content settings exceptions lists.
This only shows the existing exceptions (doesn't allow you to add or remove them). It also only works for image exceptions. It always shows the exceptions, instead of hiding/showing them when you press the exceptions button. BUG=48862 TEST=manual Review URL: http://codereview.chromium.org/2856058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53542 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
-rw-r--r--chrome/installer/util/google_update_settings.cc8
3 files changed, 11 insertions, 1 deletions
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 93586b5..8f259ee 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -658,6 +658,9 @@ const char kNumPacThreads[] = "num-pac-threads";
// Launch URL in new browser window.
const char kOpenInNewWindow[] = "new-window";
+// Simulate an organic Chrome install.
+const char kOrganicInstall[] = "organic";
+
// Package an extension to a .crx installable file from a given directory.
const char kPackExtension[] = "pack-extension";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index ce8a7bc..8059630 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -195,6 +195,7 @@ extern const char kNoReferrers[];
extern const char kNoSandbox[];
extern const char kNumPacThreads[];
extern const char kOpenInNewWindow[];
+extern const char kOrganicInstall[];
extern const char kPackExtension[];
extern const char kPackExtensionKey[];
extern const char kParentProfile[];
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",