diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm chromium-browser-12.0.742.112~r90304/src/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm	2011-06-08 00:43:02.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm	2011-07-16 15:15:15.040000249 +0200
@@ -14,7 +14,6 @@
 #include "chrome/browser/autocomplete/autocomplete_match.h"
 #include "chrome/browser/autocomplete/autocomplete_popup_model.h"
 #include "chrome/browser/instant/instant_confirm_dialog.h"
-#include "chrome/browser/instant/promo_counter.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/cocoa/event_utils.h"
 #include "chrome/browser/ui/cocoa/image_utils.h"
@@ -551,9 +550,6 @@
 }
 
 void AutocompletePopupViewMac::UserPressedOptIn(bool opt_in) {
-  PromoCounter* counter = model_->profile()->GetInstantPromoCounter();
-  DCHECK(counter);
-  counter->Hide();
   if (opt_in) {
     browser::ShowInstantConfirmDialogIfNecessary([field_ window],
                                                  model_->profile());
@@ -564,8 +560,7 @@
 }
 
 bool AutocompletePopupViewMac::ShouldShowInstantOptIn() {
-  PromoCounter* counter = model_->profile()->GetInstantPromoCounter();
-  return (counter && counter->ShouldShow(base::Time::Now()));
+  return false;
 }
 
 @implementation AutocompleteButtonCell
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/apps_promo.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/apps_promo.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/apps_promo.cc	2011-06-08 00:43:01.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/apps_promo.cc	1970-01-01 01:00:00.000000000 +0100
@@ -1,221 +0,0 @@
-// Copyright (c) 2011 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/browser/extensions/apps_promo.h"
-
-#include "base/command_line.h"
-#include "base/metrics/histogram.h"
-#include "chrome/browser/browser_process.h"
-#include "chrome/browser/prefs/pref_service.h"
-#include "chrome/browser/ui/webui/shown_sections_handler.h"
-#include "chrome/common/chrome_switches.h"
-#include "chrome/common/extensions/extension.h"
-#include "chrome/common/pref_names.h"
-
-const int AppsPromo::kDefaultAppsCounterMax = 10;
-
-// static
-void AppsPromo::RegisterPrefs(PrefService* local_state) {
-  std::string empty;
-  local_state->RegisterStringPref(prefs::kNTPWebStorePromoId, empty);
-  local_state->RegisterStringPref(prefs::kNTPWebStorePromoHeader, empty);
-  local_state->RegisterStringPref(prefs::kNTPWebStorePromoButton, empty);
-  local_state->RegisterStringPref(prefs::kNTPWebStorePromoLink, empty);
-  local_state->RegisterStringPref(prefs::kNTPWebStorePromoExpire, empty);
-}
-
-// static
-void AppsPromo::RegisterUserPrefs(PrefService* prefs) {
-  // Set the default value for the counter to max+1 since we don't install
-  // default apps for new users.
-  prefs->RegisterIntegerPref(
-      prefs::kAppsPromoCounter, kDefaultAppsCounterMax + 1);
-  prefs->RegisterBooleanPref(prefs::kDefaultAppsInstalled, false);
-  prefs->RegisterStringPref(prefs::kNTPWebStorePromoLastId, std::string());
-}
-
-// static
-void AppsPromo::ClearPromo() {
-  PrefService* local_state = g_browser_process->local_state();
-  local_state->ClearPref(prefs::kNTPWebStorePromoId);
-  local_state->ClearPref(prefs::kNTPWebStorePromoHeader);
-  local_state->ClearPref(prefs::kNTPWebStorePromoButton);
-  local_state->ClearPref(prefs::kNTPWebStorePromoLink);
-  local_state->ClearPref(prefs::kNTPWebStorePromoExpire);
-}
-
-// static
-std::string AppsPromo::GetPromoButtonText() {
-  PrefService* local_state = g_browser_process->local_state();
-  return local_state->GetString(prefs::kNTPWebStorePromoButton);
-}
-
-// static
-std::string AppsPromo::GetPromoId() {
-  PrefService* local_state = g_browser_process->local_state();
-  return local_state->GetString(prefs::kNTPWebStorePromoId);
-}
-
-// static
-std::string AppsPromo::GetPromoHeaderText() {
-  PrefService* local_state = g_browser_process->local_state();
-  return local_state->GetString(prefs::kNTPWebStorePromoHeader);
-}
-
-// static
-GURL AppsPromo::GetPromoLink() {
-  PrefService* local_state = g_browser_process->local_state();
-  return GURL(local_state->GetString(prefs::kNTPWebStorePromoLink));
-}
-
-// static
-std::string AppsPromo::GetPromoExpireText() {
-  PrefService* local_state = g_browser_process->local_state();
-  return local_state->GetString(prefs::kNTPWebStorePromoExpire);
-}
-
-// static
-void AppsPromo::SetPromo(const std::string& id,
-                         const std::string& header_text,
-                         const std::string& button_text,
-                         const GURL& link,
-                         const std::string& expire_text) {
-  PrefService* local_state = g_browser_process->local_state();
-  local_state->SetString(prefs::kNTPWebStorePromoId, id);
-  local_state->SetString(prefs::kNTPWebStorePromoButton, button_text);
-  local_state->SetString(prefs::kNTPWebStorePromoHeader, header_text);
-  local_state->SetString(prefs::kNTPWebStorePromoLink, link.spec());
-  local_state->SetString(prefs::kNTPWebStorePromoExpire, expire_text);
-}
-
-// static
-bool AppsPromo::IsPromoSupportedForLocale() {
-  PrefService* local_state = g_browser_process->local_state();
-  // PromoResourceService will clear the promo data if the current locale is
-  // not supported.
-  return local_state->HasPrefPath(prefs::kNTPWebStorePromoId) &&
-      local_state->HasPrefPath(prefs::kNTPWebStorePromoHeader) &&
-      local_state->HasPrefPath(prefs::kNTPWebStorePromoButton) &&
-      local_state->HasPrefPath(prefs::kNTPWebStorePromoLink) &&
-      local_state->HasPrefPath(prefs::kNTPWebStorePromoExpire);
-}
-
-AppsPromo::AppsPromo(PrefService* prefs)
-    : prefs_(prefs) {
-  // Poppit, Entanglement
-  old_default_app_ids_.insert("mcbkbpnkkkipelfledbfocopglifcfmi");
-  old_default_app_ids_.insert("aciahcmjmecflokailenpkdchphgkefd");
-}
-
-AppsPromo::~AppsPromo() {}
-
-bool AppsPromo::ShouldShowPromo(const ExtensionIdSet& installed_ids,
-                                bool* just_expired) {
-  *just_expired = false;
-
-  if (CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kForceAppsPromoVisible)) {
-    return true;
-  }
-
-  // Don't show the promo if one wasn't served to this locale.
-  if (!IsPromoSupportedForLocale())
-    return false;
-
-  int promo_counter = GetPromoCounter();
-  if (GetDefaultAppsInstalled() && promo_counter <= kDefaultAppsCounterMax) {
-    // If the default apps were installed from a previous Chrome version, we
-    // should still show the promo. If we don't have the exact set of default
-    // apps, this means that the user manually installed or uninstalled one.
-    // We no longer keep track of the default apps once others have been
-    // installed, so expire them immediately.
-    if (old_default_app_ids_ != installed_ids) {
-      ExpireDefaultApps();
-      return false;
-    }
-
-    if (promo_counter == kDefaultAppsCounterMax) {
-      *just_expired = true;
-
-      // The default apps have expired due to inaction, so ping PROMO_EXPIRE.
-      UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppsPromoHistogram,
-                                extension_misc::PROMO_EXPIRE,
-                                extension_misc::PROMO_BUCKET_BOUNDARY);
-
-      ExpireDefaultApps();
-      return true;
-    } else {
-      SetPromoCounter(++promo_counter);
-      return true;
-    }
-  } else if (installed_ids.empty()) {
-    return true;
-  }
-
-  return false;
-}
-
-bool AppsPromo::ShouldShowAppLauncher(const ExtensionIdSet& installed_ids) {
-  // On Chrome OS the default apps are installed via a separate mechanism that
-  // is always enabled. Therefore we always show the launcher.
-#if defined(OS_CHROME)
-  return true;
-#else
-
-  // Always show the app launcher if an app is installed.
-  if (!installed_ids.empty())
-    return true;
-
-  // Otherwise, only show the app launcher if there's a promo for this locale.
-  return IsPromoSupportedForLocale();
-#endif
-}
-
-void AppsPromo::ExpireDefaultApps() {
-  SetPromoCounter(kDefaultAppsCounterMax + 1);
-}
-
-void AppsPromo::MaximizeAppsIfFirstView() {
-  std::string promo_id = GetPromoId();
-
-  // Maximize the apps section of the NTP if this is the first time viewing the
-  // specific promo.
-  if (GetLastPromoId() != promo_id) {
-    prefs_->SetString(prefs::kNTPWebStorePromoLastId, promo_id);
-    ShownSectionsHandler::SetShownSection(prefs_, APPS);
-  }
-}
-
-void AppsPromo::HidePromo() {
-  UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppsPromoHistogram,
-                            extension_misc::PROMO_CLOSE,
-                            extension_misc::PROMO_BUCKET_BOUNDARY);
-
-  // Put the apps section into menu mode, and maximize the recent section.
-  ShownSectionsHandler::SetShownSection(prefs_, MENU_APPS);
-  ShownSectionsHandler::SetShownSection(prefs_, THUMB);
-
-  ExpireDefaultApps();
-}
-
-std::string AppsPromo::GetLastPromoId() {
-  return prefs_->GetString(prefs::kNTPWebStorePromoLastId);
-}
-
-void AppsPromo::SetLastPromoId(const std::string& id) {
-  prefs_->SetString(prefs::kNTPWebStorePromoLastId, id);
-}
-
-int AppsPromo::GetPromoCounter() const {
-  return prefs_->GetInteger(prefs::kAppsPromoCounter);
-}
-
-void AppsPromo::SetPromoCounter(int val) {
-  prefs_->SetInteger(prefs::kAppsPromoCounter, val);
-  prefs_->ScheduleSavePersistentPrefs();
-}
-
-bool AppsPromo::GetDefaultAppsInstalled() const {
-  return prefs_->GetBoolean(prefs::kDefaultAppsInstalled);
-}
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/apps_promo.h chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/apps_promo.h
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/apps_promo.h	2011-06-08 00:43:01.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/apps_promo.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,113 +0,0 @@
-// Copyright (c) 2011 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.
-
-#ifndef CHROME_BROWSER_EXTENSIONS_APPS_PROMO_H_
-#define CHROME_BROWSER_EXTENSIONS_APPS_PROMO_H_
-#pragma once
-
-#include <set>
-#include <string>
-
-#include "base/gtest_prod_util.h"
-#include "chrome/common/extensions/extension.h"
-
-class PrefService;
-
-// This encapsulates business logic for:
-// - Whether to show the apps promo in the launcher
-// - Whether to expire existing default apps
-class AppsPromo {
- public:
-  // Register our preferences. Parts of the promo content are stored in Local
-  // State since they're independent of the user profile.
-  static void RegisterPrefs(PrefService* local_state);
-  static void RegisterUserPrefs(PrefService* prefs);
-
-  // Removes the current promo data.
-  static void ClearPromo();
-
-  // Gets the ID of the current promo.
-  static std::string GetPromoId();
-
-  // Gets the text for the promo button.
-  static std::string GetPromoButtonText();
-
-  // Gets the text for the promo header.
-  static std::string GetPromoHeaderText();
-
-  // Gets the promo link.
-  static GURL GetPromoLink();
-
-  // Gets the text for the promo "hide this" link.
-  static std::string GetPromoExpireText();
-
-  // Called to set the current promo data.
-  static void SetPromo(const std::string& id,
-                       const std::string& header_text,
-                       const std::string& button_text,
-                       const GURL& link,
-                       const std::string& expire_text);
-
-  explicit AppsPromo(PrefService* prefs);
-  ~AppsPromo();
-
-  // Gets the set of old default apps that may have been installed by previous
-  // versions of Chrome.
-  const ExtensionIdSet& old_default_apps() const {
-    return old_default_app_ids_;
-  }
-
-  // Halts the special treatment of the default apps. The default apps may be
-  // removed by the caller after calling this method. If the apps remain
-  // installed, AppsPromo will no longer consider the apps "default".
-  void ExpireDefaultApps();
-
-  // Called to hide the promo from the apps section.
-  void HidePromo();
-
-  // Maximizes the apps section the first time this is called for a given promo.
-  void MaximizeAppsIfFirstView();
-
-  // Returns true if the app launcher should be displayed on the NTP.
-  bool ShouldShowAppLauncher(const ExtensionIdSet& installed_ids);
-
-  // Returns true if the apps promo should be displayed in the launcher.
-  bool ShouldShowPromo(const ExtensionIdSet& installed_ids,
-                       bool* just_expired);
-
- private:
-  FRIEND_TEST_ALL_PREFIXES(ExtensionAppsPromo, HappyPath);
-  FRIEND_TEST_ALL_PREFIXES(ExtensionAppsPromo, PromoPrefs);
-  FRIEND_TEST_ALL_PREFIXES(ExtensionAppsPromo, UpdatePromoFocus);
-
-  // The maximum number of times to show the apps promo. The promo counter
-  // actually goes up to this number + 1 because we need to differentiate
-  // between the first time we overflow and subsequent times.
-  static const int kDefaultAppsCounterMax;
-
-  // Returns true if a promo is available for the current locale.
-  static bool IsPromoSupportedForLocale();
-
-  bool GetDefaultAppsInstalled() const;
-
-  // Gets/sets the ID of the last promo shown.
-  std::string GetLastPromoId();
-  void SetLastPromoId(const std::string& id);
-
-  // Gets/sets the number of times the promo has been viewed. Promo views are
-  // only counted when the default apps are installed.
-  int GetPromoCounter() const;
-  void SetPromoCounter(int val);
-
-  // Our permanent state is stored in this PrefService instance.
-  PrefService* prefs_;
-
-  // The set of default extensions. Initialized to a static list in the
-  // constructor.
-  ExtensionIdSet old_default_app_ids_;
-
-  DISALLOW_COPY_AND_ASSIGN(AppsPromo);
-};
-
-#endif  // CHROME_BROWSER_EXTENSIONS_APPS_PROMO_H_
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/apps_promo_unittest.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/apps_promo_unittest.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/apps_promo_unittest.cc	2011-06-08 00:43:01.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/apps_promo_unittest.cc	1970-01-01 01:00:00.000000000 +0100
@@ -1,183 +0,0 @@
-// Copyright (c) 2011 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 "base/logging.h"
-#include "chrome/browser/extensions/apps_promo.h"
-#include "chrome/browser/prefs/browser_prefs.h"
-#include "chrome/browser/ui/webui/shown_sections_handler.h"
-#include "chrome/common/extensions/extension.h"
-#include "chrome/common/pref_names.h"
-#include "chrome/test/testing_browser_process.h"
-#include "chrome/test/testing_pref_service.h"
-#include "googleurl/src/gurl.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace {
-
-const char kPromoId[] = "23123123";
-const char kPromoHeader[] = "Get great apps!";
-const char kPromoButton[] = "Click for apps!";
-const char kPromoLink[] = "http://apps.com";
-const char kPromoExpire[] = "No thanks.";
-
-} // namespace
-
-class ExtensionAppsPromo : public testing::Test {
- public:
-  TestingPrefService* local_state() { return &local_state_; }
-  TestingPrefService* prefs() { return &prefs_; }
-  AppsPromo* apps_promo() { return apps_promo_; }
-
- protected:
-  explicit ExtensionAppsPromo();
-  virtual ~ExtensionAppsPromo();
-
-  // testing::Test
-  virtual void SetUp();
-  virtual void TearDown();
-
- private:
-  TestingPrefService local_state_;
-  TestingPrefService prefs_;
-  AppsPromo* apps_promo_;
-};
-
-ExtensionAppsPromo::ExtensionAppsPromo() :
-    apps_promo_(new AppsPromo(&prefs_)) {
-}
-
-ExtensionAppsPromo::~ExtensionAppsPromo() {
-  delete apps_promo_;
-}
-
-void ExtensionAppsPromo::SetUp() {
-  browser::RegisterLocalState(&local_state_);
-  browser::RegisterUserPrefs(&prefs_);
-
-  TestingBrowserProcess* testing_browser_process =
-      static_cast<TestingBrowserProcess*>(g_browser_process);
-  testing_browser_process->SetPrefService(&local_state_);
-}
-
-void ExtensionAppsPromo::TearDown() {
-  TestingBrowserProcess* testing_browser_process =
-      static_cast<TestingBrowserProcess*>(g_browser_process);
-  testing_browser_process->SetPrefService(NULL);
-}
-
-// TODO(dpolukhin): On Chrome OS all apps are installed via external extensions,
-// and the web store promo is never shown.
-#if !defined(OS_CHROMEOS)
-TEST_F(ExtensionAppsPromo, HappyPath) {
-  const ExtensionIdSet& default_app_ids = apps_promo()->old_default_apps();
-
-  EXPECT_GT(default_app_ids.size(), 0u);
-
-  // The promo counter should default to the max, since we only use the counter
-  // if they were installed from older versions of Chrome.
-  EXPECT_EQ(AppsPromo::kDefaultAppsCounterMax + 1,
-            apps_promo()->GetPromoCounter());
-
-  // The app launcher and promo should not be shown if there are no extensions
-  // installed and no promo is set.
-  ExtensionIdSet installed_ids;
-  bool promo_just_expired = false;
-  EXPECT_FALSE(AppsPromo::IsPromoSupportedForLocale());
-  EXPECT_FALSE(apps_promo()->ShouldShowAppLauncher(installed_ids));
-  EXPECT_FALSE(apps_promo()->ShouldShowPromo(installed_ids,
-                                             &promo_just_expired));
-  EXPECT_FALSE(promo_just_expired);
-
-  // Once the promo is set, we show both the promo and app launcher.
-  AppsPromo::SetPromo(
-      kPromoId, kPromoHeader, kPromoButton, GURL(kPromoLink), kPromoExpire);
-
-  EXPECT_TRUE(AppsPromo::IsPromoSupportedForLocale());
-  EXPECT_TRUE(apps_promo()->ShouldShowAppLauncher(installed_ids));
-  EXPECT_TRUE(apps_promo()->ShouldShowPromo(installed_ids,
-                                           &promo_just_expired));
-  EXPECT_FALSE(promo_just_expired);
-
-
-  // Now install an app and the promo should not be shown.
-  installed_ids.insert(*(default_app_ids.begin()));
-  EXPECT_TRUE(AppsPromo::IsPromoSupportedForLocale());
-  EXPECT_TRUE(apps_promo()->ShouldShowAppLauncher(installed_ids));
-  EXPECT_FALSE(apps_promo()->ShouldShowPromo(installed_ids,
-                                             &promo_just_expired));
-  EXPECT_FALSE(promo_just_expired);
-
-  // Even if the user installs the exact set of default apps, we still don't
-  // show the promo.
-  installed_ids = default_app_ids;
-  EXPECT_TRUE(AppsPromo::IsPromoSupportedForLocale());
-  EXPECT_TRUE(apps_promo()->ShouldShowAppLauncher(installed_ids));
-  EXPECT_FALSE(apps_promo()->ShouldShowPromo(installed_ids,
-                                             &promo_just_expired));
-  EXPECT_FALSE(promo_just_expired);
-
-  // If the user then uninstalls the apps, the app launcher should remain
-  // and the promo should return.
-  installed_ids.clear();
-  EXPECT_TRUE(AppsPromo::IsPromoSupportedForLocale());
-  EXPECT_TRUE(apps_promo()->ShouldShowAppLauncher(installed_ids));
-  EXPECT_TRUE(apps_promo()->ShouldShowPromo(installed_ids,
-                                            &promo_just_expired));
-  EXPECT_FALSE(promo_just_expired);
-}
-
-// Tests get and set of promo content.
-TEST_F(ExtensionAppsPromo, PromoPrefs) {
-  // Store a promo....
-  AppsPromo::SetPromo(
-      kPromoId, kPromoHeader, kPromoButton, GURL(kPromoLink), kPromoExpire);
-
-  // ... then make sure AppsPromo can access it.
-  EXPECT_EQ(kPromoId, AppsPromo::GetPromoId());
-  EXPECT_EQ(kPromoHeader, AppsPromo::GetPromoHeaderText());
-  EXPECT_EQ(kPromoButton, AppsPromo::GetPromoButtonText());
-  EXPECT_EQ(GURL(kPromoLink), AppsPromo::GetPromoLink());
-  EXPECT_EQ(kPromoExpire, AppsPromo::GetPromoExpireText());
-  EXPECT_TRUE(AppsPromo::IsPromoSupportedForLocale());
-
-  AppsPromo::ClearPromo();
-  EXPECT_EQ("", AppsPromo::GetPromoId());
-  EXPECT_EQ("", AppsPromo::GetPromoHeaderText());
-  EXPECT_EQ("", AppsPromo::GetPromoButtonText());
-  EXPECT_EQ(GURL(""), AppsPromo::GetPromoLink());
-  EXPECT_EQ("", AppsPromo::GetPromoExpireText());
-  EXPECT_FALSE(AppsPromo::IsPromoSupportedForLocale());
-}
-
-// Tests that the apps section is maxmized when showing a promo for the first
-// time.
-TEST_F(ExtensionAppsPromo, UpdatePromoFocus) {
-  ExtensionIdSet installed_ids;
-
-  bool promo_just_expired = false;
-  EXPECT_FALSE(apps_promo()->ShouldShowPromo(installed_ids,
-                                             &promo_just_expired));
-  EXPECT_FALSE(promo_just_expired);
-
-  // Set the promo content.
-  AppsPromo::SetPromo(
-      kPromoId, kPromoHeader, kPromoButton, GURL(kPromoLink), kPromoExpire);
-
-  // After asking if we should show the promo, the
-  EXPECT_TRUE(AppsPromo::IsPromoSupportedForLocale());
-  EXPECT_TRUE(apps_promo()->ShouldShowPromo(installed_ids,
-                                            &promo_just_expired));
-  apps_promo()->MaximizeAppsIfFirstView();
-
-  EXPECT_TRUE(
-      (ShownSectionsHandler::GetShownSections(prefs()) & APPS) != 0);
-  EXPECT_FALSE(
-      (ShownSectionsHandler::GetShownSections(prefs()) & THUMB) != 0);
-
-  apps_promo()->HidePromo();
-
-  EXPECT_TRUE((ShownSectionsHandler::GetShownSections(prefs()) &
-               (MENU_APPS | THUMB)) != 0);
-}
-#endif  // OS_CHROMEOS
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/extension_service.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/extension_service.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/extension_service.cc	2011-06-08 00:43:01.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/extension_service.cc	2011-07-16 14:40:34.028000133 +0200
@@ -25,7 +25,6 @@
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/debugger/devtools_manager.h"
 #include "chrome/browser/extensions/crx_installer.h"
-#include "chrome/browser/extensions/apps_promo.h"
 #include "chrome/browser/extensions/extension_accessibility_api.h"
 #include "chrome/browser/extensions/extension_bookmarks_module.h"
 #include "chrome/browser/extensions/extension_browser_event_router.h"
@@ -423,7 +422,6 @@
       show_extensions_prompts_(true),
       ready_(false),
       ALLOW_THIS_IN_INITIALIZER_LIST(toolbar_model_(this)),
-      apps_promo_(profile->GetPrefs()),
       event_routers_initialized_(false) {
   CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
 
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/extension_service.h chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/extension_service.h
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/extension_service.h	2011-06-08 00:43:01.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/extensions/extension_service.h	2011-07-16 14:40:54.888000113 +0200
@@ -20,7 +20,6 @@
 #include "base/time.h"
 #include "base/tuple.h"
 #include "base/version.h"
-#include "chrome/browser/extensions/apps_promo.h"
 #include "chrome/browser/extensions/extension_icon_manager.h"
 #include "chrome/browser/extensions/extension_menu_manager.h"
 #include "chrome/browser/extensions/extension_prefs.h"
@@ -186,8 +185,6 @@
 
   const FilePath& install_directory() const { return install_directory_; }
 
-  AppsPromo* apps_promo() { return &apps_promo_; }
-
   // Whether this extension can run in an incognito window.
   virtual bool IsIncognitoEnabled(const std::string& extension_id) const;
   virtual void SetIsIncognitoEnabled(const std::string& extension_id,
@@ -614,9 +611,6 @@
   typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions;
   RegisteredComponentExtensions component_extension_manifests_;
 
-  // Manages the promotion of the web store.
-  AppsPromo apps_promo_;
-
   // Flag to make sure event routers are only initialized once.
   bool event_routers_initialized_;
 
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/instant_confirm_dialog.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/instant_confirm_dialog.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/instant_confirm_dialog.cc	2011-06-08 00:43:30.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/instant_confirm_dialog.cc	2011-07-16 14:42:55.140000185 +0200
@@ -5,7 +5,6 @@
 #include "chrome/browser/instant/instant_confirm_dialog.h"
 
 #include "chrome/browser/instant/instant_controller.h"
-#include "chrome/browser/instant/promo_counter.h"
 #include "chrome/browser/prefs/pref_service.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/common/pref_names.h"
@@ -25,10 +24,6 @@
   if (!prefs)
     return;
 
-  PromoCounter* promo_counter = profile->GetInstantPromoCounter();
-  if (promo_counter)
-    promo_counter->Hide();
-
   if (prefs->GetBoolean(prefs::kInstantConfirmDialogShown)) {
     InstantController::Enable(profile);
     return;
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/instant_controller.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/instant_controller.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/instant_controller.cc	2011-06-08 00:43:30.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/instant_controller.cc	2011-07-16 14:42:37.148000109 +0200
@@ -12,7 +12,6 @@
 #include "chrome/browser/instant/instant_delegate.h"
 #include "chrome/browser/instant/instant_loader.h"
 #include "chrome/browser/instant/instant_loader_manager.h"
-#include "chrome/browser/instant/promo_counter.h"
 #include "chrome/browser/platform_util.h"
 #include "chrome/browser/prefs/pref_service.h"
 #include "chrome/browser/profiles/profile.h"
@@ -61,7 +60,6 @@
   prefs->RegisterBooleanPref(prefs::kInstantEnabled, false);
   prefs->RegisterBooleanPref(prefs::kInstantEnabledOnce, false);
   prefs->RegisterInt64Pref(prefs::kInstantEnabledTime, false);
-  PromoCounter::RegisterUserPrefs(prefs, prefs::kInstantPromo);
 }
 
 // static
@@ -93,9 +91,6 @@
 
 // static
 void InstantController::Enable(Profile* profile) {
-  PromoCounter* promo_counter = profile->GetInstantPromoCounter();
-  if (promo_counter)
-    promo_counter->Hide();
 
   PrefService* service = profile->GetPrefs();
   if (!service)
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/promo_counter.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/promo_counter.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/promo_counter.cc	2011-06-08 00:43:30.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/promo_counter.cc	1970-01-01 01:00:00.000000000 +0100
@@ -1,115 +0,0 @@
-// 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/browser/instant/promo_counter.h"
-
-#include "base/metrics/histogram.h"
-#include "base/values.h"
-#include "chrome/browser/prefs/pref_service.h"
-#include "chrome/browser/profiles/profile.h"
-
-// Pref keys. These are relative to pref_key_.
-static const char* kShowKey = ".show";
-static const char* kNumSessionsKey = ".num_sessions";
-static const char* kInitialTimeKey = ".initial_time";
-
-// Values used for histograms. These are relative to histogram_key_.
-static const char* kHistogramHide = ".hide";
-static const char* kHistogramMaxSessions = ".max_sessions";
-static const char* kHistogramMaxTime = ".max_time";
-
-PromoCounter::PromoCounter(Profile* profile,
-                           const std::string& pref_key,
-                           const std::string& histogram_key,
-                           int max_sessions,
-                           int max_days)
-    : profile_(profile),
-      pref_key_(pref_key),
-      histogram_key_(histogram_key),
-      max_sessions_(max_sessions),
-      max_days_(max_days),
-      did_init_(false),
-      show_(false) {
-}
-
-PromoCounter::~PromoCounter() {
-}
-
-// static
-void PromoCounter::RegisterUserPrefs(PrefService* prefs,
-                                     const std::string& base_key) {
-  prefs->RegisterBooleanPref((base_key + kShowKey).c_str(), true);
-  prefs->RegisterIntegerPref((base_key + kNumSessionsKey).c_str(), 0);
-  prefs->RegisterInt64Pref((base_key + kInitialTimeKey).c_str(), 0);
-}
-
-bool PromoCounter::ShouldShow(base::Time current_time) {
-  if (!did_init_) {
-    did_init_ = true;
-    Init(current_time);
-  }
-
-  if (show_ && (current_time - initial_show_).InDays() >= max_days_)
-    MaxTimeLapsed(current_time);
-
-  return show_;
-}
-
-void PromoCounter::Hide() {
-  show_ = false;
-  did_init_ = true;
-  UMA_HISTOGRAM_CUSTOM_COUNTS(histogram_key_ + kHistogramHide,
-                              (base::Time::Now() - initial_show_).InHours(),
-                              1, max_days_ * 24, 24);
-  if (profile_->GetPrefs())
-    profile_->GetPrefs()->SetBoolean((pref_key_ + kShowKey).c_str(), false);
-}
-
-void PromoCounter::Init(base::Time current_time) {
-  PrefService* prefs = profile_->GetPrefs();
-  if (!prefs)
-    return;
-
-  show_ = prefs->GetBoolean((pref_key_ + kShowKey).c_str());
-  if (!show_)
-    return;
-
-  // The user hasn't chosen to opt in or out. Only show the opt-in if it's
-  // less than max_days_ since we first showed the opt-in, or the user hasn't
-  // launched the profile max_sessions_ times.
-  int session_count = prefs->GetInteger((pref_key_ + kNumSessionsKey).c_str());
-  int64 initial_show_int =
-      prefs->GetInt64((pref_key_ + kInitialTimeKey).c_str());
-  initial_show_ = base::Time(base::Time::FromInternalValue(initial_show_int));
-  if (initial_show_int == 0 || initial_show_ > current_time) {
-    initial_show_ = base::Time::Now();
-    prefs->SetInt64((pref_key_ + kInitialTimeKey).c_str(),
-                    initial_show_.ToInternalValue());
-  }
-  if (session_count >= max_sessions_) {
-    // Time check is handled in ShouldShow.
-    MaxSessionsEncountered(current_time);
-  } else {
-    // Up the session count.
-    prefs->SetInteger((pref_key_ + kNumSessionsKey).c_str(), session_count + 1);
-  }
-}
-
-void PromoCounter::MaxSessionsEncountered(base::Time current_time) {
-  show_ = false;
-  UMA_HISTOGRAM_CUSTOM_COUNTS(histogram_key_ + kHistogramMaxSessions,
-                              (current_time - initial_show_).InHours(), 1,
-                              max_days_ * 24, 24);
-  if (profile_->GetPrefs())
-    profile_->GetPrefs()->SetBoolean((pref_key_ + kShowKey).c_str(), false);
-}
-
-void PromoCounter::MaxTimeLapsed(base::Time current_time) {
-  show_ = false;
-  UMA_HISTOGRAM_CUSTOM_COUNTS(histogram_key_ + kHistogramMaxTime,
-                              (current_time - initial_show_).InHours(),
-                              1, max_days_ * 24, 24);
-  if (profile_->GetPrefs())
-    profile_->GetPrefs()->SetBoolean((pref_key_ + kShowKey).c_str(), false);
-}
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/promo_counter.h chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/promo_counter.h
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/promo_counter.h	2011-06-08 00:43:30.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/promo_counter.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,78 +0,0 @@
-// 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.
-
-#ifndef CHROME_BROWSER_INSTANT_PROMO_COUNTER_H_
-#define CHROME_BROWSER_INSTANT_PROMO_COUNTER_H_
-#pragma once
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/time.h"
-
-class PrefService;
-class Profile;
-
-// PromoCounter is used to track whether a promo should be shown. The promo is
-// shown for a specified number of days or sessions (launches of chrome).
-class PromoCounter {
- public:
-  // Creates a new PromoCounter. |pref_key| is used to store prefs related to
-  // the promo. |histogram_key| is the key used to store histograms related to
-  // the promo. See the .cc file for the exact prefs and histogram values used.
-  // |ShouldShow| returns true until the users restarts chrome |max_sessions| or
-  // runs Chrome for |max_days|, or |Hide| is invoked.
-  PromoCounter(Profile* profile,
-               const std::string& pref_key,
-               const std::string& histogram_key,
-               int max_sessions,
-               int max_days);
-  ~PromoCounter();
-
-  // Registers the preferences used by PromoCounter.
-  static void RegisterUserPrefs(PrefService* prefs,
-                                const std::string& base_key);
-
-  // Returns true if the promo should be shown.
-  bool ShouldShow(base::Time current_time);
-
-  // Permanently hides the promo.
-  void Hide();
-
- private:
-  // Called the first time ShouldShow is invoked. Updates the necessary pref
-  // state and show_.
-  void Init(base::Time current_time);
-
-  // Invoked if the max number of sessions has been encountered.
-  void MaxSessionsEncountered(base::Time current_time);
-
-  // Invoked if the max number of days has elapsed.
-  void MaxTimeLapsed(base::Time current_time);
-
-  Profile* profile_;
-
-  // Base key all prefs are stored under.
-  const std::string pref_key_;
-
-  // Base key used for histograms.
-  const std::string histogram_key_;
-
-  // Max number of sessions/days before the promo stops.
-  const int max_sessions_;
-  const int max_days_;
-
-  // Has Init been invoked?
-  bool did_init_;
-
-  // Return value from ShouldShow.
-  bool show_;
-
-  // Initial time the promo was first shown.
-  base::Time initial_show_;
-
-  DISALLOW_COPY_AND_ASSIGN(PromoCounter);
-};
-
-#endif  // CHROME_BROWSER_INSTANT_PROMO_COUNTER_H_
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/promo_counter_unittest.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/promo_counter_unittest.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/promo_counter_unittest.cc	2011-06-08 00:43:30.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/instant/promo_counter_unittest.cc	1970-01-01 01:00:00.000000000 +0100
@@ -1,81 +0,0 @@
-// 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/browser/instant/promo_counter.h"
-#include "chrome/test/testing_profile.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-typedef testing::Test PromoCounterTest;
-
-// Makes sure ShouldShow returns false after the max number of days.
-TEST_F(PromoCounterTest, MaxTimeElapsed) {
-  TestingProfile profile;
-  PromoCounter::RegisterUserPrefs(profile.GetPrefs(), "test");
-
-  base::Time test_time(base::Time::Now());
-  PromoCounter counter(&profile, "test", "test", 2, 2);
-  ASSERT_TRUE(counter.ShouldShow(test_time));
-  ASSERT_TRUE(counter.ShouldShow(test_time + base::TimeDelta::FromHours(2)));
-  ASSERT_FALSE(counter.ShouldShow(test_time + base::TimeDelta::FromDays(4)));
-}
-
-// Makes sure ShouldShow returns false after max number of sessions encountered.
-TEST_F(PromoCounterTest, MaxSessionsLapsed) {
-  TestingProfile profile;
-  PromoCounter::RegisterUserPrefs(profile.GetPrefs(), "test");
-
-  base::Time test_time(base::Time::Now());
-  {
-    PromoCounter counter(&profile, "test", "test", 2, 2);
-    ASSERT_TRUE(counter.ShouldShow(test_time));
-  }
-
-  {
-    PromoCounter counter(&profile, "test", "test", 2, 2);
-    ASSERT_TRUE(counter.ShouldShow(test_time));
-  }
-
-  {
-    PromoCounter counter(&profile, "test", "test", 2, 2);
-    ASSERT_FALSE(counter.ShouldShow(test_time));
-  }
-}
-
-// Makes sure invoking Hide make ShouldShow return false.
-TEST_F(PromoCounterTest, Hide) {
-  TestingProfile profile;
-  PromoCounter::RegisterUserPrefs(profile.GetPrefs(), "test");
-
-  base::Time test_time(base::Time::Now());
-  {
-    PromoCounter counter(&profile, "test", "test", 2, 2);
-    counter.Hide();
-    ASSERT_FALSE(counter.ShouldShow(test_time));
-  }
-
-  // Recreate to make sure pref was correctly written.
-  {
-    PromoCounter counter(&profile, "test", "test", 2, 2);
-    ASSERT_FALSE(counter.ShouldShow(test_time));
-  }
-}
-
-// Same as Hide, but invokes ShouldShow first.
-TEST_F(PromoCounterTest, Hide2) {
-  TestingProfile profile;
-  PromoCounter::RegisterUserPrefs(profile.GetPrefs(), "test");
-
-  base::Time test_time(base::Time::Now());
-  {
-    PromoCounter counter(&profile, "test", "test", 2, 2);
-    ASSERT_TRUE(counter.ShouldShow(test_time));
-    counter.Hide();
-    ASSERT_FALSE(counter.ShouldShow(test_time));
-  }
-
-  {
-    PromoCounter counter(&profile, "test", "test", 2, 2);
-    ASSERT_FALSE(counter.ShouldShow(test_time));
-  }
-}
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/prefs/browser_prefs.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/prefs/browser_prefs.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/prefs/browser_prefs.cc	2011-06-08 00:43:14.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/prefs/browser_prefs.cc	2011-07-16 14:47:11.087999922 +0200
@@ -15,7 +15,6 @@
 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
 #include "chrome/browser/debugger/devtools_manager.h"
 #include "chrome/browser/download/download_prefs.h"
-#include "chrome/browser/extensions/apps_promo.h"
 #include "chrome/browser/extensions/extension_prefs.h"
 #include "chrome/browser/extensions/extension_web_ui.h"
 #include "chrome/browser/extensions/extensions_ui.h"
@@ -53,7 +52,6 @@
 #include "chrome/browser/ui/webui/new_tab_ui.h"
 #include "chrome/browser/ui/webui/plugins_ui.h"
 #include "chrome/browser/upgrade_detector.h"
-#include "chrome/browser/web_resource/promo_resource_service.h"
 #include "chrome/common/pref_names.h"
 #include "content/browser/host_zoom_map.h"
 #include "content/browser/renderer_host/browser_render_process_host.h"
@@ -82,7 +80,6 @@
 
 void RegisterLocalState(PrefService* local_state) {
   // Prefs in Local State
-  AppsPromo::RegisterPrefs(local_state);
   Browser::RegisterPrefs(local_state);
   FlagsUI::RegisterPrefs(local_state);
   WebCacheManager::RegisterPrefs(local_state);
@@ -92,7 +89,6 @@
   KeywordEditorController::RegisterPrefs(local_state);
   MetricsLog::RegisterPrefs(local_state);
   MetricsService::RegisterPrefs(local_state);
-  PromoResourceService::RegisterPrefs(local_state);
   SafeBrowsingService::RegisterPrefs(local_state);
   browser_shutdown::RegisterPrefs(local_state);
 #if defined(TOOLKIT_VIEWS)
@@ -120,7 +116,6 @@
 
 void RegisterUserPrefs(PrefService* user_prefs) {
   // User prefs
-  AppsPromo::RegisterUserPrefs(user_prefs);
   AutofillManager::RegisterUserPrefs(user_prefs);
   SessionStartupPref::RegisterUserPrefs(user_prefs);
   Browser::RegisterUserPrefs(user_prefs);
@@ -135,7 +130,6 @@
   NewTabUI::RegisterUserPrefs(user_prefs);
   PluginsUI::RegisterUserPrefs(user_prefs);
   ProfileImpl::RegisterUserPrefs(user_prefs);
-  PromoResourceService::RegisterUserPrefs(user_prefs);
   HostContentSettingsMap::RegisterUserPrefs(user_prefs);
   HostZoomMap::RegisterUserPrefs(user_prefs);
   DevToolsManager::RegisterUserPrefs(user_prefs);
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile.cc	2011-06-08 00:43:00.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile.cc	2011-07-16 14:48:14.208000112 +0200
@@ -571,10 +571,6 @@
     NOTREACHED();
   }
 
-  virtual void InitPromoResources() {
-    NOTREACHED();
-  }
-
   virtual void InitRegisteredProtocolHandlers() {
     NOTREACHED();
   }
@@ -651,10 +647,6 @@
     return chrome_url_data_manager_.get();
   }
 
-  virtual PromoCounter* GetInstantPromoCounter() {
-    return NULL;
-  }
-
 #if defined(OS_CHROMEOS)
   virtual void ChangeAppLocale(const std::string& locale, AppLocaleChangedVia) {
   }
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile.h chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile.h
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile.h	2011-06-08 00:43:00.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile.h	2011-07-16 14:48:33.708000190 +0200
@@ -79,7 +79,6 @@
 class PrefService;
 class ProfileSyncFactory;
 class ProfileSyncService;
-class PromoCounter;
 class ProtocolHandlerRegistry;
 class SQLitePersistentCookieStore;
 class SSLConfigServiceManager;
@@ -98,7 +97,6 @@
 class VisitedLinkMaster;
 class WebDataService;
 class WebKitContext;
-class PromoResourceService;
 
 namespace net {
 class URLRequestContextGetter;
@@ -482,9 +480,6 @@
   // are controlled by |extensions_enabled|.
   virtual void InitExtensions(bool extensions_enabled) = 0;
 
-  // Start up service that gathers data from a promo resource feed.
-  virtual void InitPromoResources() = 0;
-
   // Register URLRequestFactories for protocols registered with
   // registerProtocolHandler.
   virtual void InitRegisteredProtocolHandlers() = 0;
@@ -503,9 +498,6 @@
   // Returns the IO-thread-accessible profile data for this profile.
   virtual ExtensionInfoMap* GetExtensionInfoMap() = 0;
 
-  // Returns the PromoCounter for Instant, or NULL if not applicable.
-  virtual PromoCounter* GetInstantPromoCounter() = 0;
-
   // Gets the policy connector associated with this profile.
   virtual policy::ProfilePolicyConnector* GetPolicyConnector() = 0;
 
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile_impl.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile_impl.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile_impl.cc	2011-06-29 08:32:00.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile_impl.cc	2011-07-16 14:49:06.364000112 +0200
@@ -75,7 +75,6 @@
 #include "chrome/browser/user_style_sheet_watcher.h"
 #include "chrome/browser/visitedlink/visitedlink_event_listener.h"
 #include "chrome/browser/visitedlink/visitedlink_master.h"
-#include "chrome/browser/web_resource/promo_resource_service.h"
 #include "chrome/browser/webdata/web_data_service.h"
 #include "chrome/common/chrome_constants.h"
 #include "chrome/common/chrome_paths.h"
@@ -100,7 +99,6 @@
 #include "webkit/database/database_tracker.h"
 
 #if defined(OS_WIN)
-#include "chrome/browser/instant/promo_counter.h"
 #include "chrome/browser/password_manager/password_store_win.h"
 #include "chrome/installer/util/install_util.h"
 #elif defined(OS_MACOSX)
@@ -276,7 +274,6 @@
       spellcheck_host_(NULL),
       spellcheck_host_ready_(false),
 #if defined(OS_WIN)
-      checked_instant_promo_(false),
 #endif
       shutdown_session_service_(false),
       delegate_(delegate) {
@@ -545,14 +542,6 @@
 #endif
 }
 
-void ProfileImpl::InitPromoResources() {
-  if (promo_resource_service_)
-    return;
-
-  promo_resource_service_ = new PromoResourceService(this);
-  promo_resource_service_->StartAfterDelay();
-}
-
 void ProfileImpl::InitRegisteredProtocolHandlers() {
   if (protocol_handler_registry_)
     return;
@@ -1432,28 +1421,6 @@
   return chrome_url_data_manager_.get();
 }
 
-PromoCounter* ProfileImpl::GetInstantPromoCounter() {
-#if defined(OS_WIN)
-  // TODO: enable this when we're ready to turn on the promo.
-  /*
-  if (!checked_instant_promo_) {
-    checked_instant_promo_ = true;
-    PrefService* prefs = GetPrefs();
-    if (!prefs->GetBoolean(prefs::kInstantEnabledOnce) &&
-        !InstantController::IsEnabled(this) &&
-        InstallUtil::IsChromeSxSProcess()) {
-      DCHECK(!instant_promo_counter_.get());
-      instant_promo_counter_.reset(
-          new PromoCounter(this, prefs::kInstantPromo, "Instant.Promo", 3, 3));
-    }
-  }
-  */
-  return instant_promo_counter_.get();
-#else
-  return NULL;
-#endif
-}
-
 #if defined(OS_CHROMEOS)
 void ProfileImpl::ChangeAppLocale(
     const std::string& new_locale, AppLocaleChangedVia via) {
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile_impl.h chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile_impl.h
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile_impl.h	2011-06-08 00:43:00.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile_impl.h	2011-07-16 14:49:46.820000113 +0200
@@ -116,7 +116,6 @@
   virtual StatusTray* GetStatusTray();
   virtual void MarkAsCleanShutdown();
   virtual void InitExtensions(bool extensions_enabled);
-  virtual void InitPromoResources();
   virtual void InitRegisteredProtocolHandlers();
   virtual NTPResourceCache* GetNTPResourceCache();
   virtual FilePath last_selected_directory();
@@ -130,7 +129,6 @@
   void InitCloudPrintProxyService();
   virtual ChromeBlobStorageContext* GetBlobStorageContext();
   virtual ExtensionInfoMap* GetExtensionInfoMap();
-  virtual PromoCounter* GetInstantPromoCounter();
   virtual BrowserSignin* GetBrowserSignin();
   virtual policy::ProfilePolicyConnector* GetPolicyConnector();
   virtual ChromeURLDataManager* GetChromeURLDataManager();
@@ -220,7 +218,6 @@
   scoped_ptr<TemplateURLFetcher> template_url_fetcher_;
   scoped_ptr<TemplateURLModel> template_url_model_;
   scoped_ptr<BookmarkModel> bookmark_bar_model_;
-  scoped_refptr<PromoResourceService> promo_resource_service_;
   scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_;
   scoped_ptr<NTPResourceCache> ntp_resource_cache_;
 
@@ -278,8 +275,6 @@
   bool spellcheck_host_ready_;
 
 #if defined(OS_WIN)
-  bool checked_instant_promo_;
-  scoped_ptr<PromoCounter> instant_promo_counter_;
 #endif
 
   // Set to true when ShutdownSessionService is invoked. If true
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile_manager.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile_manager.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile_manager.cc	2011-06-08 00:43:00.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/profiles/profile_manager.cc	2011-07-16 14:50:00.556000114 +0200
@@ -364,8 +364,6 @@
 #endif
   profile->InitExtensions(init_extensions);
 
-  if (!command_line.HasSwitch(switches::kDisableWebResources))
-    profile->InitPromoResources();
 }
 
 void ProfileManager::OnProfileCreated(Profile* profile, bool success) {
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/new_new_tab.css chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/new_new_tab.css
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/new_new_tab.css	2011-06-08 00:43:08.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/new_new_tab.css	2011-07-16 15:07:02.184000250 +0200
@@ -106,18 +106,6 @@
   font-weight: normal;
 }
 
-#notification.promo {
-  padding: 5px 13px; /* subtract the border width */
-  border: 1px solid hsl(0, 0%, 80%);
-  background-color: hsl(120, 93%, 93%);
-  -webkit-box-shadow: 2px 2px 3px hsla(0, 0%, 0%, .3);
-  font-weight: normal;
-}
-
-#notification.promo a {
-  color: rgb(0, 102, 204);
-}
-
 #notification-close {
   display: inline-block;
   border: 0;
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/new_new_tab.html chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/new_new_tab.html
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/new_new_tab.html	2011-06-08 00:43:08.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/new_new_tab.html	2011-07-16 15:17:03.900000249 +0200
@@ -145,11 +145,6 @@
   </div>
 
   <div class="maxiview" id="apps-maxiview">
-    <div id="apps-promo">
-      <p id="apps-promo-heading"></p>
-      <a class="g-button-basic" id="apps-promo-link" href=""></a><br>
-      <button id="apps-promo-hide"></button>
-    </div>
     <div id="apps-content"></div>
   </div>
   <div class="maxiview" id="most-visited-maxiview"></div>
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/new_new_tab.js chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/new_new_tab.js
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/new_new_tab.js	2011-06-08 00:43:08.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/new_new_tab.js	2011-07-16 15:20:52.588000253 +0200
@@ -1007,14 +1007,11 @@
   }
 
   function closeNotification() {
-    if (notification.classList.contains('promo'))
-      chrome.send('closePromo');
     hideNotification();
   }
 
   // Remove classList entries from previous notifications.
   notification.classList.remove('first-run');
-  notification.classList.remove('promo');
 
   var messageContainer = notificationElement.firstElementChild;
   var actionLink = notificationElement.querySelector('#action-link');
@@ -1076,15 +1073,6 @@
   }
 }
 
-function showPromoNotification() {
-  showNotification(parseHtmlSubset(localStrings.getString('serverpromo')),
-                   localStrings.getString('syncpromotext'),
-                   function () { chrome.send('SyncLinkClicked'); },
-                   60000);
-  var notificationElement = $('notification');
-  notification.classList.add('promo');
-}
-
 $('main').addEventListener('click', function(e) {
   var p = e.target;
   while (p && p.tagName != 'H2') {
@@ -1444,7 +1432,6 @@
   }, 1);
 
   if (localStrings.getString('serverpromo')) {
-    showPromoNotification();
   }
 }
 
@@ -1456,14 +1443,3 @@
 function isDoneLoading() {
   return !document.body.classList.contains('loading');
 }
-
-// Initialize the listener for the "hide this" link on the apps promo. We do
-// this outside of getAppsCallback because it only needs to be done once per
-// NTP load.
-document.addEventListener('DOMContentLoaded', function() {
-  $('apps-promo-hide').addEventListener('click', function() {
-    chrome.send('hideAppsPromo', []);
-    document.documentElement.classList.remove('apps-promo-visible');
-    layoutSections();
-  });
-});
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/new_new_tab_theme.css chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/new_new_tab_theme.css
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/new_new_tab_theme.css	2011-06-08 00:43:08.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/new_new_tab_theme.css	2011-07-16 15:21:38.224000250 +0200
@@ -140,10 +140,3 @@
   background-color: $$1; /* COLOR_NTP_SECTION */;
 }
 
-#apps-promo-hide {
-  color: $9; /* COLOR_NTP_LINK */
-}
-
-#apps-promo-text2 {
-  color: $$$3; /* COLOR_NTP_TEXT_LIGHT */
-}
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/ntp/apps.css chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/ntp/apps.css
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/ntp/apps.css	2011-06-08 00:43:06.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/ntp/apps.css	2011-07-16 15:22:10.048000533 +0200
@@ -5,10 +5,6 @@
   max-width: 780px;  /* (124 + margin * 2) * 6 */
 }
 
-html.apps-promo-visible #apps-content {
-  max-width: 650px; /* (124 + margin * 2) * 5 */
-}
-
 #apps-maxiview {
   overflow: hidden;
 }
@@ -137,41 +133,6 @@
   font-weight: bold;
 }
 
-#apps-promo {
-  display: none;
-}
-
-html.apps-promo-visible #apps-promo {
-  background: url('chrome://theme/IDR_WEBSTORE_ICON') no-repeat;
-  height: 125px;
-  -webkit-padding-start: 125px;
-  display: table-cell;
-  vertical-align: text-bottom;
-}
-
-#apps-promo-heading {
-  font-size: 115%;
-  font-weight: bold;
-  margin-bottom: 5px;
-  -webkit-margin-start: 3px;
-}
-
-#apps-promo-hide {
-  -webkit-appearance: none;
-  -webkit-transition: opacity .15s;
-  background-color: transparent;
-  border: 0;
-  cursor: pointer;
-  font-family: inherit;
-  font-size: 90%;
-  text-decoration: underline;
-  margin-top: 2px;
-}
-
-html[dir=rtl] #apps-promo-hide {
-  float: left;
-}
-
 /*
 We position the web store entry all by its lonesome in the top of the rightmost
 column when there is at least one full row of apps. Note that this is similar,
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/ntp/apps.js chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/ntp/apps.js
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/ntp/apps.js	2011-06-08 00:43:06.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/resources/ntp/apps.js	2011-07-16 15:19:53.004000252 +0200
@@ -11,15 +11,10 @@
 
   // In the case of prefchange-triggered updates, we don't receive this flag.
   // Just leave it set as it was before in that case.
-  if ('showPromo' in data)
-    apps.showPromo = data.showPromo;
 
   var appsSection = $('apps');
   var appsSectionContent = $('apps-content');
   var appsMiniview = appsSection.getElementsByClassName('miniview')[0];
-  var appsPromo = $('apps-promo');
-  var appsPromoLink = $('apps-promo-link');
-  var appsPromoPing = APP_LAUNCH_URL.PING_WEBSTORE + '+' + apps.showPromo;
   var webStoreEntry, webStoreMiniEntry;
 
   // Hide menu options that are not supported on the OS or windowing system.
@@ -44,8 +39,7 @@
 
   // Determines if the web store link should be detached and place in the
   // top right of the screen.
-  apps.detachWebstoreEntry =
-      !apps.showPromo && data.apps.length >= MAX_APPS_PER_ROW[layoutMode];
+  apps.detachWebstoreEntry = data.apps.length >= MAX_APPS_PER_ROW[layoutMode];
 
   markNewApps(data.apps);
   apps.data = data.apps;
@@ -61,25 +55,10 @@
     appsSectionContent.appendChild(apps.createElement(app));
   });
 
-  if (data.showPromo) {
-    // Add the promo content...
-    $('apps-promo-heading').textContent = data.promoHeader;
-    appsPromoLink.href = data.promoLink;
-    appsPromoLink.textContent = data.promoButton;
-    appsPromoLink.ping = appsPromoPing;
-    $('apps-promo-hide').textContent = data.promoExpire;
-
-    // ... then display the promo.
-    document.documentElement.classList.add('apps-promo-visible');
-  } else {
-    document.documentElement.classList.remove('apps-promo-visible');
-  }
-
   // Only show the web store entry if there are apps installed, since the promo
   // is sufficient otherwise.
   if (data.apps.length > 0) {
     webStoreEntry = apps.createWebStoreElement();
-    webStoreEntry.querySelector('a').ping = appsPromoPing;
     appsSectionContent.appendChild(webStoreEntry);
     if (apps.detachWebstoreEntry) {
       webStoreEntry.classList.add('loner');
@@ -95,7 +74,6 @@
   });
   if (data.apps.length < MAX_MINIVIEW_ITEMS) {
     webStoreMiniEntry = apps.createWebStoreMiniElement();
-    webStoreMiniEntry.querySelector('a').ping = appsPromoPing;
     appsMiniview.appendChild(webStoreMiniEntry);
     addClosedMenuEntryWithLink(apps.menu,
                                apps.createWebStoreClosedMenuElement());
@@ -110,8 +88,6 @@
 
   apps.loaded = true;
 
-  if (appsPromoLink)
-    appsPromoLink.ping = appsPromoPing;
   maybeDoneLoading();
 
   // Disable the animations when the app launcher is being (re)initailized.
@@ -234,7 +210,6 @@
   };
 
   var currentApp;
-  var promoHasBeenSeen = false;
 
   function addContextMenu(el, app) {
     el.addEventListener('contextmenu', cr.ui.contextMenuHandler);
@@ -334,8 +309,6 @@
 
     menu: $('apps-menu'),
 
-    showPromo: false,
-
     detachWebstoreEntry: false,
 
     scrollMouseXY_: null,
@@ -366,14 +339,6 @@
       this.invalidate_();
     },
 
-    maybePingPromoSeen_: function() {
-      if (promoHasBeenSeen || !this.showPromo || !isAppSectionMaximized())
-        return;
-
-      promoHasBeenSeen = true;
-      chrome.send('promoSeen', []);
-    },
-
     // DragAndDropDelegate
 
     dragContainer: $('apps-content'),
@@ -595,10 +560,6 @@
       var rects = this.getLayoutRects_(apps.length);
       var appsContent = this.dragContainer;
 
-      // Ping the PROMO_SEEN histogram only when the promo is maximized, and
-      // maximum once per NTP load.
-      this.maybePingPromoSeen_();
-
       if (!this.visible)
         return;
 
@@ -682,8 +643,6 @@
       var a = div.firstChild;
 
       a.onclick = handleClick;
-      a.ping = getAppPingUrl(
-          'PING_BY_ID', this.showPromo, 'NTP_APPS_MAXIMIZED');
       a.style.backgroundImage = url(app['icon_big']);
       if (app.isNew) {
         div.setAttribute('new', 'new');
@@ -722,8 +681,6 @@
       a.textContent = app['name'];
       a.href = app['launch_url'];
       a.onclick = handleClick;
-      a.ping = getAppPingUrl(
-          'PING_BY_ID', this.showPromo, 'NTP_APPS_COLLAPSED');
       a.style.backgroundImage = url(app['icon_small']);
       a.className = 'item';
       span.appendChild(a);
@@ -739,8 +696,6 @@
       a.textContent = app['name'];
       a.href = app['launch_url'];
       a.onclick = handleClick;
-      a.ping = getAppPingUrl(
-          'PING_BY_ID', this.showPromo, 'NTP_APPS_MENU');
       a.style.backgroundImage = url(app['icon_small']);
       a.className = 'item';
 
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc	2011-06-08 00:43:26.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc	2011-07-16 15:05:01.556000250 +0200
@@ -9,7 +9,6 @@
 #include "chrome/browser/autocomplete/autocomplete_edit_view.h"
 #include "chrome/browser/autocomplete/autocomplete_popup_model.h"
 #include "chrome/browser/instant/instant_confirm_dialog.h"
-#include "chrome/browser/instant/promo_counter.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/views/autocomplete/autocomplete_result_view.h"
 #include "chrome/browser/ui/views/bubble/bubble_border.h"
@@ -306,12 +305,7 @@
   for (size_t i = model_->result().size(); i < child_rv_count; ++i)
     GetChildViewAt(i)->SetVisible(false);
 
-  PromoCounter* counter = model_->profile()->GetInstantPromoCounter();
-  if (!opt_in_view_ && counter && counter->ShouldShow(base::Time::Now())) {
-    opt_in_view_ = new InstantOptInView(this, result_bold_font_, result_font_);
-    AddChildView(opt_in_view_);
-  } else if (opt_in_view_ && (!counter ||
-                              !counter->ShouldShow(base::Time::Now()))) {
+  if (opt_in_view_) {
     delete opt_in_view_;
     opt_in_view_ = NULL;
   }
@@ -673,9 +667,6 @@
 void AutocompletePopupContentsView::UserPressedOptIn(bool opt_in) {
   delete opt_in_view_;
   opt_in_view_ = NULL;
-  PromoCounter* counter = model_->profile()->GetInstantPromoCounter();
-  DCHECK(counter);
-  counter->Hide();
   if (opt_in) {
     browser::ShowInstantConfirmDialogIfNecessary(
         location_bar_->GetWindow()->GetNativeWindow(), model_->profile());
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/app_launcher_handler.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/app_launcher_handler.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/app_launcher_handler.cc	2011-06-08 00:43:25.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/app_launcher_handler.cc	2011-07-16 14:58:42.260000247 +0200
@@ -13,7 +13,6 @@
 #include "base/string_util.h"
 #include "base/utf_string_conversions.h"
 #include "base/values.h"
-#include "chrome/browser/extensions/apps_promo.h"
 #include "chrome/browser/extensions/extension_prefs.h"
 #include "chrome/browser/extensions/extension_service.h"
 #include "chrome/browser/platform_util.h"
@@ -64,7 +63,6 @@
 
 AppLauncherHandler::AppLauncherHandler(ExtensionService* extension_service)
     : extensions_service_(extension_service),
-      promo_active_(false),
       ignore_changes_(false) {
 }
 
@@ -139,22 +137,6 @@
 
   CHECK(params.size() >= 2);
 
-  bool is_promo_active = params.at(1) == "true";
-
-  // At this point, the user must have used the app launcher, so we hide the
-  // promo if its still displayed.
-  if (is_promo_active) {
-    DCHECK(profile->GetExtensionService());
-    profile->GetExtensionService()->apps_promo()->ExpireDefaultApps();
-  }
-
-  if (is_web_store_ping) {
-    RecordWebStoreLaunch(is_promo_active);
-  }  else {
-    CHECK(params.size() == 3);
-    RecordAppLaunchByID(is_promo_active, ParseLaunchSource(params.at(2)));
-  }
-
   return true;
 }
 
@@ -172,16 +154,12 @@
       NewCallback(this, &AppLauncherHandler::HandleSetLaunchType));
   web_ui_->RegisterMessageCallback("uninstallApp",
       NewCallback(this, &AppLauncherHandler::HandleUninstallApp));
-  web_ui_->RegisterMessageCallback("hideAppsPromo",
-      NewCallback(this, &AppLauncherHandler::HandleHideAppsPromo));
   web_ui_->RegisterMessageCallback("createAppShortcut",
       NewCallback(this, &AppLauncherHandler::HandleCreateAppShortcut));
   web_ui_->RegisterMessageCallback("reorderApps",
       NewCallback(this, &AppLauncherHandler::HandleReorderApps));
   web_ui_->RegisterMessageCallback("setPageIndex",
       NewCallback(this, &AppLauncherHandler::HandleSetPageIndex));
-  web_ui_->RegisterMessageCallback("promoSeen",
-      NewCallback(this, &AppLauncherHandler::HandlePromoSeen));
 }
 
 void AppLauncherHandler::Observe(NotificationType type,
@@ -194,9 +172,6 @@
     case NotificationType::EXTENSION_LOADED:
     case NotificationType::EXTENSION_UNLOADED:
     case NotificationType::EXTENSION_LAUNCHER_REORDERED:
-    // The promo may not load until a couple seconds after the first NTP view,
-    // so we listen for the load notification and notify the NTP when ready.
-    case NotificationType::WEB_STORE_PROMO_LOADED:
       if (web_ui_->tab_contents())
         HandleGetApps(NULL);
       break;
@@ -251,54 +226,11 @@
   dictionary->SetBoolean("disableCreateAppShortcut", true);
 #endif
 
-  dictionary->SetBoolean(
-      "showLauncher",
-      extensions_service_->apps_promo()->ShouldShowAppLauncher(
-          extensions_service_->GetAppIds()));
-}
-
-void AppLauncherHandler::FillPromoDictionary(DictionaryValue* dictionary) {
-  dictionary->SetString("promoHeader", AppsPromo::GetPromoHeaderText());
-  dictionary->SetString("promoButton", AppsPromo::GetPromoButtonText());
-  dictionary->SetString("promoLink", AppsPromo::GetPromoLink().spec());
-  dictionary->SetString("promoExpire", AppsPromo::GetPromoExpireText());
 }
 
 void AppLauncherHandler::HandleGetApps(const ListValue* args) {
   DictionaryValue dictionary;
 
-  // Tell the client whether to show the promo for this view. We don't do this
-  // in the case of PREF_CHANGED because:
-  //
-  // a) At that point in time, depending on the pref that changed, it can look
-  //    like the set of apps installed has changed, and we will mark the promo
-  //    expired.
-  // b) Conceptually, it doesn't really make sense to count a
-  //    prefchange-triggered refresh as a promo 'view'.
-  AppsPromo* apps_promo = extensions_service_->apps_promo();
-  PrefService* prefs = web_ui_->GetProfile()->GetPrefs();
-  bool apps_promo_just_expired = false;
-  if (apps_promo->ShouldShowPromo(extensions_service_->GetAppIds(),
-                                  &apps_promo_just_expired)) {
-    // Maximize the apps section on the first promo view.
-    apps_promo->MaximizeAppsIfFirstView();
-    dictionary.SetBoolean("showPromo", true);
-    FillPromoDictionary(&dictionary);
-    promo_active_ = true;
-  } else {
-    dictionary.SetBoolean("showPromo", false);
-    promo_active_ = false;
-  }
-
-  // If the default apps have just expired (user viewed them too many times with
-  // no interaction), then we uninstall them and focus the recent sites section.
-  if (apps_promo_just_expired) {
-    ignore_changes_ = true;
-    UninstallDefaultApps();
-    ignore_changes_ = false;
-    ShownSectionsHandler::SetShownSection(prefs, THUMB);
-  }
-
   FillAppDictionary(&dictionary);
   web_ui_->CallJavascriptFunction("getAppsCallback", dictionary);
 
@@ -311,8 +243,6 @@
         NotificationService::AllSources());
     registrar_.Add(this, NotificationType::EXTENSION_LAUNCHER_REORDERED,
         NotificationService::AllSources());
-    registrar_.Add(this, NotificationType::WEB_STORE_PROMO_LOADED,
-        NotificationService::AllSources());
   }
   if (pref_change_registrar_.IsEmpty()) {
     pref_change_registrar_.Init(
@@ -364,11 +294,6 @@
         disposition_utils::DispositionFromClick(middle_button, alt_key,
                                                 ctrl_key, meta_key, shift_key);
 
-  if (extension_id != extension_misc::kWebStoreAppId) {
-    RecordAppLaunchByID(promo_active_, launch_bucket);
-    extensions_service_->apps_promo()->ExpireDefaultApps();
-  }
-
   if (disposition == NEW_FOREGROUND_TAB || disposition == NEW_BACKGROUND_TAB) {
     // TODO(jamescook): Proper support for background tabs.
     Browser::OpenApplication(
@@ -436,17 +361,6 @@
   GetExtensionUninstallDialog()->ConfirmUninstall(this, extension);
 }
 
-void AppLauncherHandler::HandleHideAppsPromo(const ListValue* args) {
-  // If the user has intentionally hidden the promotion, we'll uninstall all the
-  // default apps (we know the user hasn't installed any apps on their own at
-  // this point, or the promotion wouldn't have been shown).
-  ignore_changes_ = true;
-  UninstallDefaultApps();
-  extensions_service_->apps_promo()->HidePromo();
-  ignore_changes_ = false;
-  HandleGetApps(NULL);
-}
-
 void AppLauncherHandler::HandleCreateAppShortcut(const ListValue* args) {
   std::string extension_id;
   if (!args->GetString(0, &extension_id)) {
@@ -494,23 +408,12 @@
       static_cast<int>(page_index));
 }
 
-void AppLauncherHandler::HandlePromoSeen(const ListValue* args) {
-  UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppsPromoHistogram,
-                            extension_misc::PROMO_SEEN,
-                            extension_misc::PROMO_BUCKET_BOUNDARY);
-}
-
 // static
 void AppLauncherHandler::RecordWebStoreLaunch(bool promo_active) {
   UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram,
                             extension_misc::APP_LAUNCH_NTP_WEBSTORE,
                             extension_misc::APP_LAUNCH_BUCKET_BOUNDARY);
 
-  if (!promo_active) return;
-
-  UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppsPromoHistogram,
-                            extension_misc::PROMO_LAUNCH_WEB_STORE,
-                            extension_misc::PROMO_BUCKET_BOUNDARY);
 }
 
 // static
@@ -521,11 +424,6 @@
   UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram, bucket,
                             extension_misc::APP_LAUNCH_BUCKET_BOUNDARY);
 
-  if (!promo_active) return;
-
-  UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppsPromoHistogram,
-                            extension_misc::PROMO_LAUNCH_APP,
-                            extension_misc::PROMO_BUCKET_BOUNDARY);
 }
 
 // static
@@ -637,11 +535,4 @@
 }
 
 void AppLauncherHandler::UninstallDefaultApps() {
-  AppsPromo* apps_promo = extensions_service_->apps_promo();
-  const ExtensionIdSet& app_ids = apps_promo->old_default_apps();
-  for (ExtensionIdSet::const_iterator iter = app_ids.begin();
-       iter != app_ids.end(); ++iter) {
-    if (extensions_service_->GetExtensionById(*iter, true))
-      extensions_service_->UninstallExtension(*iter, false, NULL);
-  }
 }
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/app_launcher_handler.h chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/app_launcher_handler.h
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/app_launcher_handler.h	2011-06-08 00:43:25.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/app_launcher_handler.h	2011-07-16 15:02:00.216000236 +0200
@@ -55,9 +55,6 @@
   // Populate the given dictionary with all installed app info.
   void FillAppDictionary(DictionaryValue* value);
 
-  // Populate the given dictionary with the web store promo content.
-  void FillPromoDictionary(DictionaryValue* value);
-
   // Callback for the "getApps" message.
   void HandleGetApps(const ListValue* args);
 
@@ -70,9 +67,6 @@
   // Callback for the "uninstallApp" message.
   void HandleUninstallApp(const ListValue* args);
 
-  // Callback for the "hideAppPromo" message.
-  void HandleHideAppsPromo(const ListValue* args);
-
   // Callback for the "createAppShortcut" message.
   void HandleCreateAppShortcut(const ListValue* args);
 
@@ -82,16 +76,15 @@
   // Callback for the "setPageIndex" message.
   void HandleSetPageIndex(const ListValue* args);
 
-  // Callback for the "promoSeen" message.
-  void HandlePromoSeen(const ListValue* args);
-
  private:
   // Records a web store launch in the appropriate histograms. |promo_active|
   // specifies if the web store promotion was active.
+	// (note promo system is disabled, so this parameter is ignored)
   static void RecordWebStoreLaunch(bool promo_active);
 
   // Records an app launch in the corresponding |bucket| of the app launch
   // histogram. |promo_active| specifies if the web store promotion was active.
+	// (note promo system is disabled, so this parameter is ignored)
   static void RecordAppLaunchByID(bool promo_active,
                                   extension_misc::AppLaunchBucket bucket);
 
@@ -142,9 +135,6 @@
   // The id of the extension we are prompting the user about.
   std::string extension_id_prompting_;
 
-  // Whether the promo is currently being shown.
-  bool promo_active_;
-
   // When true, we ignore changes to the underlying data rather than immediately
   // refreshing. This is useful when making many batch updates to avoid flicker.
   bool ignore_changes_;
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/new_tab_page_sync_handler.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/new_tab_page_sync_handler.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/new_tab_page_sync_handler.cc	2011-06-08 00:43:25.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/new_tab_page_sync_handler.cc	2011-07-16 15:02:36.652000250 +0200
@@ -87,8 +87,6 @@
   switch (type) {
     case sync_ui_util::SYNC_ERROR:
       return SYNC_ERROR;
-    case sync_ui_util::SYNC_PROMO:
-      return SYNC_PROMO;
     case sync_ui_util::PRE_SYNCED:
     case sync_ui_util::SYNCED:
     default:
@@ -190,8 +188,6 @@
   } else {
     if (type == SYNC_ERROR)
       title = l10n_util::GetStringUTF8(IDS_SYNC_NTP_SYNC_SECTION_ERROR_TITLE);
-    else if (type == SYNC_PROMO)
-      title = l10n_util::GetStringUTF8(IDS_SYNC_NTP_SYNC_SECTION_PROMO_TITLE);
     else
       NOTREACHED();
 
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/new_tab_page_sync_handler.h chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/new_tab_page_sync_handler.h
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/new_tab_page_sync_handler.h	2011-06-08 00:43:25.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/new_tab_page_sync_handler.h	2011-07-16 15:02:48.324000247 +0200
@@ -38,7 +38,6 @@
   enum MessageType {
     HIDE,
     SYNC_ERROR,
-    SYNC_PROMO
   };
   // Helper to invoke the |syncMessageChanged| JS function on the new tab page.
   void SendSyncMessageToPage(MessageType type,
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/new_tab_ui.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/new_tab_ui.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/new_tab_ui.cc	2011-06-08 00:43:25.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/new_tab_ui.cc	2011-07-16 15:00:41.088000246 +0200
@@ -245,41 +245,6 @@
   web_ui_->CallJavascriptFunction("onHomePageSet", list_value);
 }
 
-///////////////////////////////////////////////////////////////////////////////
-// NewTabPageClosePromoHandler
-
-// Turns off the promo line permanently when it has been explicitly closed by
-// the user.
-class NewTabPageClosePromoHandler : public WebUIMessageHandler {
- public:
-  NewTabPageClosePromoHandler() {}
-  virtual ~NewTabPageClosePromoHandler() {}
-
-  // WebUIMessageHandler implementation.
-  virtual void RegisterMessages();
-
-  // Callback for "closePromo".
-  void HandleClosePromo(const ListValue* args);
-
- private:
-
-  DISALLOW_COPY_AND_ASSIGN(NewTabPageClosePromoHandler);
-};
-
-void NewTabPageClosePromoHandler::RegisterMessages() {
-  web_ui_->RegisterMessageCallback("closePromo", NewCallback(
-      this, &NewTabPageClosePromoHandler::HandleClosePromo));
-}
-
-void NewTabPageClosePromoHandler::HandleClosePromo(
-    const ListValue* args) {
-  web_ui_->GetProfile()->GetPrefs()->SetBoolean(prefs::kNTPPromoClosed, true);
-  NotificationService* service = NotificationService::current();
-  service->Notify(NotificationType::PROMO_RESOURCE_STATE_CHANGED,
-                  Source<NewTabPageClosePromoHandler>(this),
-                  NotificationService::NoDetails());
-}
-
 }  // namespace
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -328,7 +293,6 @@
       AddMessageHandler((new AppLauncherHandler(service))->Attach(this));
 
     AddMessageHandler((new NewTabPageSetHomePageHandler())->Attach(this));
-    AddMessageHandler((new NewTabPageClosePromoHandler())->Attach(this));
   }
 
   // Initializing the CSS and HTML can require some CPU, so do it after
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/ntp_resource_cache.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/ntp_resource_cache.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/ntp_resource_cache.cc	2011-06-08 00:43:25.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/ui/webui/ntp_resource_cache.cc	2011-07-16 14:59:52.012000238 +0200
@@ -23,7 +23,6 @@
 #include "chrome/browser/themes/theme_service_factory.h"
 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
 #include "chrome/browser/ui/webui/shown_sections_handler.h"
-#include "chrome/browser/web_resource/promo_resource_service.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/extensions/extension.h"
 #include "chrome/common/extensions/extension_constants.h"
@@ -151,8 +150,6 @@
 NTPResourceCache::NTPResourceCache(Profile* profile) : profile_(profile) {
   registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
                  NotificationService::AllSources());
-  registrar_.Add(this, NotificationType::PROMO_RESOURCE_STATE_CHANGED,
-                 NotificationService::AllSources());
 
   // Watch for pref changes that cause us to need to invalidate the HTML cache.
   pref_change_registrar_.Init(profile_->GetPrefs());
@@ -192,8 +189,7 @@
 void NTPResourceCache::Observe(NotificationType type,
     const NotificationSource& source, const NotificationDetails& details) {
   // Invalidate the cache.
-  if (NotificationType::BROWSER_THEME_CHANGED == type ||
-      NotificationType::PROMO_RESOURCE_STATE_CHANGED == type) {
+  if (NotificationType::BROWSER_THEME_CHANGED == type ) {
     new_tab_incognito_html_ = NULL;
     new_tab_html_ = NULL;
     new_tab_incognito_css_ = NULL;
@@ -370,20 +366,6 @@
     localized_strings.SetString("customlogo", "false");
   }
 
-  // If the user has preferences for a start and end time for a promo from
-  // the server, and this promo string exists, set the localized string.
-  if (profile_->GetPrefs()->FindPreference(prefs::kNTPPromoStart) &&
-      profile_->GetPrefs()->FindPreference(prefs::kNTPPromoEnd) &&
-      profile_->GetPrefs()->FindPreference(prefs::kNTPPromoLine) &&
-      PromoResourceServiceUtil::CanShowPromo(profile_)) {
-    localized_strings.SetString("serverpromo",
-        InDateRange(profile_->GetPrefs()->GetDouble(prefs::kNTPPromoStart),
-                    profile_->GetPrefs()->GetDouble(prefs::kNTPPromoEnd)) ?
-                    profile_->GetPrefs()->GetString(prefs::kNTPPromoLine) :
-                                                    std::string());
-    UserMetrics::RecordAction(UserMetricsAction("NTPPromoShown"));
-  }
-
   // Load the new tab page appropriate for this build
   // Note that some builds (eg. TOUCHUI) don't make use of everything we
   // do here (all of the template data, etc.), but we keep the back end
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/web_resource/promo_resource_service.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/web_resource/promo_resource_service.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/web_resource/promo_resource_service.cc	2011-06-08 00:43:31.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/web_resource/promo_resource_service.cc	1970-01-01 01:00:00.000000000 +0100
@@ -1,441 +0,0 @@
-// Copyright (c) 2011 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/browser/web_resource/promo_resource_service.h"
-
-#include "base/string_number_conversions.h"
-#include "base/threading/thread_restrictions.h"
-#include "base/time.h"
-#include "base/values.h"
-#include "chrome/browser/browser_process.h"
-#include "chrome/browser/extensions/apps_promo.h"
-#include "chrome/browser/platform_util.h"
-#include "chrome/browser/prefs/pref_service.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/sync_ui_util.h"
-#include "chrome/common/pref_names.h"
-#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
-#include "content/common/notification_type.h"
-#include "googleurl/src/gurl.h"
-
-namespace {
-
-// Delay on first fetch so we don't interfere with startup.
-static const int kStartResourceFetchDelay = 5000;
-
-// Delay between calls to update the cache (48 hours).
-static const int kCacheUpdateDelay = 48 * 60 * 60 * 1000;
-
-// Users are randomly assigned to one of kNTPPromoGroupSize buckets, in order
-// to be able to roll out promos slowly, or display different promos to
-// different groups.
-static const int kNTPPromoGroupSize = 16;
-
-// Maximum number of hours for each time slice (4 weeks).
-static const int kMaxTimeSliceHours = 24 * 7 * 4;
-
-// The version of the service (used to expire the cache when upgrading Chrome
-// to versions with different types of promos).
-static const int kPromoServiceVersion = 1;
-
-// Properties used by the server.
-static const char kAnswerIdProperty[] = "answer_id";
-static const char kWebStoreHeaderProperty[] = "question";
-static const char kWebStoreButtonProperty[] = "inproduct_target";
-static const char kWebStoreLinkProperty[] = "inproduct";
-static const char kWebStoreExpireProperty[] = "tooltip";
-
-}  // namespace
-
-// Server for dynamically loaded NTP HTML elements. TODO(mirandac): append
-// locale for future usage, when we're serving localizable strings.
-const char* PromoResourceService::kDefaultPromoResourceServer =
-    "https://www.google.com/support/chrome/bin/topic/1142433/inproduct?hl=";
-
-// static
-void PromoResourceService::RegisterPrefs(PrefService* local_state) {
-  local_state->RegisterIntegerPref(prefs::kNTPPromoVersion, 0);
-  local_state->RegisterStringPref(prefs::kNTPPromoLocale, std::string());
-}
-
-// static
-void PromoResourceService::RegisterUserPrefs(PrefService* prefs) {
-  prefs->RegisterDoublePref(prefs::kNTPCustomLogoStart, 0);
-  prefs->RegisterDoublePref(prefs::kNTPCustomLogoEnd, 0);
-  prefs->RegisterDoublePref(prefs::kNTPPromoStart, 0);
-  prefs->RegisterDoublePref(prefs::kNTPPromoEnd, 0);
-  prefs->RegisterStringPref(prefs::kNTPPromoLine, std::string());
-  prefs->RegisterBooleanPref(prefs::kNTPPromoClosed, false);
-  prefs->RegisterIntegerPref(prefs::kNTPPromoGroup, -1);
-  prefs->RegisterIntegerPref(prefs::kNTPPromoBuild,
-       CANARY_BUILD | DEV_BUILD | BETA_BUILD | STABLE_BUILD);
-  prefs->RegisterIntegerPref(prefs::kNTPPromoGroupTimeSlice, 0);
-}
-
-// static
-bool PromoResourceService::IsBuildTargeted(const std::string& channel,
-                                           int builds_allowed) {
-  if (builds_allowed == NO_BUILD)
-    return false;
-  if (channel == "canary" || channel == "canary-m") {
-    return (CANARY_BUILD & builds_allowed) != 0;
-  } else if (channel == "dev" || channel == "dev-m") {
-    return (DEV_BUILD & builds_allowed) != 0;
-  } else if (channel == "beta" || channel == "beta-m") {
-    return (BETA_BUILD & builds_allowed) != 0;
-  } else if (channel == "" || channel == "m") {
-    return (STABLE_BUILD & builds_allowed) != 0;
-  } else {
-    return false;
-  }
-}
-
-PromoResourceService::PromoResourceService(Profile* profile)
-    : WebResourceService(profile,
-                         profile->GetPrefs(),
-                         PromoResourceService::kDefaultPromoResourceServer,
-                         true,  // append locale to URL
-                         NotificationType::PROMO_RESOURCE_STATE_CHANGED,
-                         prefs::kNTPPromoResourceCacheUpdate,
-                         kStartResourceFetchDelay,
-                         kCacheUpdateDelay),
-      web_resource_cache_(NULL),
-      channel_(NULL) {
-  Init();
-}
-
-PromoResourceService::~PromoResourceService() { }
-
-void PromoResourceService::Init() {
-  ScheduleNotificationOnInit();
-}
-
-bool PromoResourceService::IsThisBuildTargeted(int builds_targeted) {
-  if (channel_ == NULL) {
-    base::ThreadRestrictions::ScopedAllowIO allow_io;
-    channel_ = platform_util::GetVersionStringModifier().c_str();
-  }
-
-  return IsBuildTargeted(channel_, builds_targeted);
-}
-
-void PromoResourceService::Unpack(const DictionaryValue& parsed_json) {
-  UnpackLogoSignal(parsed_json);
-  UnpackPromoSignal(parsed_json);
-  UnpackWebStoreSignal(parsed_json);
-}
-
-void PromoResourceService::ScheduleNotification(double promo_start,
-                                                double promo_end) {
-  if (promo_start > 0 && promo_end > 0) {
-    int64 ms_until_start =
-        static_cast<int64>((base::Time::FromDoubleT(
-            promo_start) - base::Time::Now()).InMilliseconds());
-    int64 ms_until_end =
-        static_cast<int64>((base::Time::FromDoubleT(
-            promo_end) - base::Time::Now()).InMilliseconds());
-    if (ms_until_start > 0)
-      PostNotification(ms_until_start);
-    if (ms_until_end > 0) {
-      PostNotification(ms_until_end);
-      if (ms_until_start <= 0) {
-        // Notify immediately if time is between start and end.
-        PostNotification(0);
-      }
-    }
-  }
-}
-
-void PromoResourceService::ScheduleNotificationOnInit() {
-  std::string locale = g_browser_process->GetApplicationLocale();
-  if ((GetPromoServiceVersion() != kPromoServiceVersion) ||
-      (GetPromoLocale() != locale)) {
-    // If the promo service has been upgraded or Chrome switched locales,
-    // refresh the promos.
-    PrefService* local_state = g_browser_process->local_state();
-    local_state->SetInteger(prefs::kNTPPromoVersion, kPromoServiceVersion);
-    local_state->SetString(prefs::kNTPPromoLocale, locale);
-    prefs_->ClearPref(prefs::kNTPPromoResourceCacheUpdate);
-    AppsPromo::ClearPromo();
-    PostNotification(0);
-  } else {
-    // If the promo start is in the future, set a notification task to
-    // invalidate the NTP cache at the time of the promo start.
-    double promo_start = prefs_->GetDouble(prefs::kNTPPromoStart);
-    double promo_end = prefs_->GetDouble(prefs::kNTPPromoEnd);
-    ScheduleNotification(promo_start, promo_end);
-  }
-}
-
-int PromoResourceService::GetPromoServiceVersion() {
-  PrefService* local_state = g_browser_process->local_state();
-  return local_state->GetInteger(prefs::kNTPPromoVersion);
-}
-
-std::string PromoResourceService::GetPromoLocale() {
-  PrefService* local_state = g_browser_process->local_state();
-  return local_state->GetString(prefs::kNTPPromoLocale);
-}
-
-void PromoResourceService::UnpackPromoSignal(
-    const DictionaryValue& parsed_json) {
-  DictionaryValue* topic_dict;
-  ListValue* answer_list;
-  double old_promo_start = 0;
-  double old_promo_end = 0;
-  double promo_start = 0;
-  double promo_end = 0;
-
-  // Check for preexisting start and end values.
-  if (prefs_->HasPrefPath(prefs::kNTPPromoStart) &&
-      prefs_->HasPrefPath(prefs::kNTPPromoEnd)) {
-    old_promo_start = prefs_->GetDouble(prefs::kNTPPromoStart);
-    old_promo_end = prefs_->GetDouble(prefs::kNTPPromoEnd);
-  }
-
-  // Check for newly received start and end values.
-  if (parsed_json.GetDictionary("topic", &topic_dict)) {
-    if (topic_dict->GetList("answers", &answer_list)) {
-      std::string promo_start_string = "";
-      std::string promo_end_string = "";
-      std::string promo_string = "";
-      std::string promo_build = "";
-      int promo_build_type = 0;
-      int time_slice_hrs = 0;
-      for (ListValue::const_iterator answer_iter = answer_list->begin();
-           answer_iter != answer_list->end(); ++answer_iter) {
-        if (!(*answer_iter)->IsType(Value::TYPE_DICTIONARY))
-          continue;
-        DictionaryValue* a_dic =
-            static_cast<DictionaryValue*>(*answer_iter);
-        std::string promo_signal;
-        if (a_dic->GetString("name", &promo_signal)) {
-          if (promo_signal == "promo_start") {
-            a_dic->GetString("question", &promo_build);
-            size_t split = promo_build.find(":");
-            if (split != std::string::npos &&
-                base::StringToInt(promo_build.substr(0, split),
-                                  &promo_build_type) &&
-                base::StringToInt(promo_build.substr(split+1),
-                                  &time_slice_hrs) &&
-                promo_build_type >= 0 &&
-                promo_build_type <= (DEV_BUILD | BETA_BUILD | STABLE_BUILD) &&
-                time_slice_hrs >= 0 &&
-                time_slice_hrs <= kMaxTimeSliceHours) {
-              prefs_->SetInteger(prefs::kNTPPromoBuild, promo_build_type);
-              prefs_->SetInteger(prefs::kNTPPromoGroupTimeSlice,
-                                 time_slice_hrs);
-            } else {
-              // If no time data or bad time data are set, do not show promo.
-              prefs_->SetInteger(prefs::kNTPPromoBuild, NO_BUILD);
-              prefs_->SetInteger(prefs::kNTPPromoGroupTimeSlice, 0);
-            }
-            a_dic->GetString("inproduct", &promo_start_string);
-            a_dic->GetString("tooltip", &promo_string);
-            prefs_->SetString(prefs::kNTPPromoLine, promo_string);
-            srand(static_cast<uint32>(time(NULL)));
-            prefs_->SetInteger(prefs::kNTPPromoGroup,
-                               rand() % kNTPPromoGroupSize);
-          } else if (promo_signal == "promo_end") {
-            a_dic->GetString("inproduct", &promo_end_string);
-          }
-        }
-      }
-      if (!promo_start_string.empty() &&
-          promo_start_string.length() > 0 &&
-          !promo_end_string.empty() &&
-          promo_end_string.length() > 0) {
-        base::Time start_time;
-        base::Time end_time;
-        if (base::Time::FromString(
-                ASCIIToWide(promo_start_string).c_str(), &start_time) &&
-            base::Time::FromString(
-                ASCIIToWide(promo_end_string).c_str(), &end_time)) {
-          // Add group time slice, adjusted from hours to seconds.
-          promo_start = start_time.ToDoubleT() +
-              (prefs_->FindPreference(prefs::kNTPPromoGroup) ?
-                  prefs_->GetInteger(prefs::kNTPPromoGroup) *
-                      time_slice_hrs * 60 * 60 : 0);
-          promo_end = end_time.ToDoubleT();
-        }
-      }
-    }
-  }
-
-  // If start or end times have changed, trigger a new web resource
-  // notification, so that the logo on the NTP is updated. This check is
-  // outside the reading of the web resource data, because the absence of
-  // dates counts as a triggering change if there were dates before.
-  // Also reset the promo closed preference, to signal a new promo.
-  if (!(old_promo_start == promo_start) ||
-      !(old_promo_end == promo_end)) {
-    prefs_->SetDouble(prefs::kNTPPromoStart, promo_start);
-    prefs_->SetDouble(prefs::kNTPPromoEnd, promo_end);
-    prefs_->SetBoolean(prefs::kNTPPromoClosed, false);
-    ScheduleNotification(promo_start, promo_end);
-  }
-}
-
-void PromoResourceService::UnpackWebStoreSignal(
-    const DictionaryValue& parsed_json) {
-  DictionaryValue* topic_dict;
-  ListValue* answer_list;
-
-  bool signal_found = false;
-  std::string promo_id = "";
-  std::string promo_header = "";
-  std::string promo_button = "";
-  std::string promo_link = "";
-  std::string promo_expire = "";
-  int target_builds = 0;
-
-  if (!parsed_json.GetDictionary("topic", &topic_dict) ||
-      !topic_dict->GetList("answers", &answer_list))
-    return;
-
-  for (ListValue::const_iterator answer_iter = answer_list->begin();
-       answer_iter != answer_list->end(); ++answer_iter) {
-    if (!(*answer_iter)->IsType(Value::TYPE_DICTIONARY))
-      continue;
-    DictionaryValue* a_dic =
-        static_cast<DictionaryValue*>(*answer_iter);
-    std::string name;
-    if (!a_dic->GetString("name", &name))
-      continue;
-
-    size_t split = name.find(":");
-    if (split == std::string::npos)
-      continue;
-
-    std::string promo_signal = name.substr(0, split);
-
-    if (promo_signal != "webstore_promo" ||
-        !base::StringToInt(name.substr(split+1), &target_builds))
-      continue;
-
-    if (!a_dic->GetString(kAnswerIdProperty, &promo_id) ||
-        !a_dic->GetString(kWebStoreHeaderProperty, &promo_header) ||
-        !a_dic->GetString(kWebStoreButtonProperty, &promo_button) ||
-        !a_dic->GetString(kWebStoreLinkProperty, &promo_link) ||
-        !a_dic->GetString(kWebStoreExpireProperty, &promo_expire))
-      continue;
-
-    if (IsThisBuildTargeted(target_builds)) {
-      // Store the first web store promo that targets the current build.
-      AppsPromo::SetPromo(
-          promo_id, promo_header, promo_button, GURL(promo_link), promo_expire);
-      signal_found = true;
-      break;
-    }
-  }
-
-  if (!signal_found) {
-    // If no web store promos target this build, then clear all the prefs.
-    AppsPromo::ClearPromo();
-  }
-
-  NotificationService::current()->Notify(
-      NotificationType::WEB_STORE_PROMO_LOADED,
-      Source<PromoResourceService>(this),
-      NotificationService::NoDetails());
-
-  return;
-}
-
-void PromoResourceService::UnpackLogoSignal(
-    const DictionaryValue& parsed_json) {
-  DictionaryValue* topic_dict;
-  ListValue* answer_list;
-  double old_logo_start = 0;
-  double old_logo_end = 0;
-  double logo_start = 0;
-  double logo_end = 0;
-
-  // Check for preexisting start and end values.
-  if (prefs_->HasPrefPath(prefs::kNTPCustomLogoStart) &&
-      prefs_->HasPrefPath(prefs::kNTPCustomLogoEnd)) {
-    old_logo_start = prefs_->GetDouble(prefs::kNTPCustomLogoStart);
-    old_logo_end = prefs_->GetDouble(prefs::kNTPCustomLogoEnd);
-  }
-
-  // Check for newly received start and end values.
-  if (parsed_json.GetDictionary("topic", &topic_dict)) {
-    if (topic_dict->GetList("answers", &answer_list)) {
-      std::string logo_start_string = "";
-      std::string logo_end_string = "";
-      for (ListValue::const_iterator answer_iter = answer_list->begin();
-           answer_iter != answer_list->end(); ++answer_iter) {
-        if (!(*answer_iter)->IsType(Value::TYPE_DICTIONARY))
-          continue;
-        DictionaryValue* a_dic =
-            static_cast<DictionaryValue*>(*answer_iter);
-        std::string logo_signal;
-        if (a_dic->GetString("name", &logo_signal)) {
-          if (logo_signal == "custom_logo_start") {
-            a_dic->GetString("inproduct", &logo_start_string);
-          } else if (logo_signal == "custom_logo_end") {
-            a_dic->GetString("inproduct", &logo_end_string);
-          }
-        }
-      }
-      if (!logo_start_string.empty() &&
-          logo_start_string.length() > 0 &&
-          !logo_end_string.empty() &&
-          logo_end_string.length() > 0) {
-        base::Time start_time;
-        base::Time end_time;
-        if (base::Time::FromString(
-                ASCIIToWide(logo_start_string).c_str(), &start_time) &&
-            base::Time::FromString(
-                ASCIIToWide(logo_end_string).c_str(), &end_time)) {
-          logo_start = start_time.ToDoubleT();
-          logo_end = end_time.ToDoubleT();
-        }
-      }
-    }
-  }
-
-  // If logo start or end times have changed, trigger a new web resource
-  // notification, so that the logo on the NTP is updated. This check is
-  // outside the reading of the web resource data, because the absence of
-  // dates counts as a triggering change if there were dates before.
-  if (!(old_logo_start == logo_start) ||
-      !(old_logo_end == logo_end)) {
-    prefs_->SetDouble(prefs::kNTPCustomLogoStart, logo_start);
-    prefs_->SetDouble(prefs::kNTPCustomLogoEnd, logo_end);
-    NotificationService* service = NotificationService::current();
-    service->Notify(NotificationType::PROMO_RESOURCE_STATE_CHANGED,
-                    Source<WebResourceService>(this),
-                    NotificationService::NoDetails());
-  }
-}
-
-namespace PromoResourceServiceUtil {
-
-bool CanShowPromo(Profile* profile) {
-  bool promo_closed = false;
-  PrefService* prefs = profile->GetPrefs();
-  if (prefs->HasPrefPath(prefs::kNTPPromoClosed))
-    promo_closed = prefs->GetBoolean(prefs::kNTPPromoClosed);
-
-  // Only show if not synced.
-  bool is_synced =
-      (profile->HasProfileSyncService() &&
-          sync_ui_util::GetStatus(
-              profile->GetProfileSyncService()) == sync_ui_util::SYNCED);
-
-  bool is_promo_build = false;
-  if (prefs->HasPrefPath(prefs::kNTPPromoBuild)) {
-    // GetVersionStringModifier hits the registry. See http://crbug.com/70898.
-    base::ThreadRestrictions::ScopedAllowIO allow_io;
-    const std::string channel = platform_util::GetVersionStringModifier();
-    is_promo_build = PromoResourceService::IsBuildTargeted(
-        channel, prefs->GetInteger(prefs::kNTPPromoBuild));
-  }
-
-  return !promo_closed && !is_synced && is_promo_build;
-}
-
-}  // namespace PromoResourceServiceUtil
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/web_resource/promo_resource_service.h chromium-browser-12.0.742.112~r90304/src/chrome/browser/web_resource/promo_resource_service.h
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/web_resource/promo_resource_service.h	2011-06-08 00:43:31.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/web_resource/promo_resource_service.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,195 +0,0 @@
-// Copyright (c) 2011 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.
-
-#ifndef CHROME_BROWSER_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_
-#define CHROME_BROWSER_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_
-#pragma once
-
-#include "chrome/browser/web_resource/web_resource_service.h"
-
-namespace PromoResourceServiceUtil {
-
-// Certain promotions should only be shown to certain classes of users. This
-// function will change to reflect each kind of promotion.
-bool CanShowPromo(Profile* profile);
-
-}  // namespace PromoResourceServiceUtil
-
-class PrefService;
-
-// A PromoResourceService fetches data from a web resource server to be used to
-// dynamically change the appearance of the New Tab Page. For example, it has
-// been used to fetch "tips" to be displayed on the NTP, or to display
-// promotional messages to certain groups of Chrome users.
-//
-// TODO(mirandac): Arrange for a server to be set up specifically for promo
-// messages, which have until now been piggybacked onto the old tips server
-// structure. (see http://crbug.com/70634 for details.)
-class PromoResourceService
-    : public WebResourceService {
- public:
-  static bool IsBuildTargeted(const std::string& channel, int builds_targeted);
-
-  static void RegisterPrefs(PrefService* local_state);
-
-  static void RegisterUserPrefs(PrefService* prefs);
-
-  explicit PromoResourceService(Profile* profile);
-
-  // Default server of dynamically loaded NTP HTML elements.
-  static const char* kDefaultPromoResourceServer;
-
- private:
-  FRIEND_TEST_ALL_PREFIXES(PromoResourceServiceTest, UnpackLogoSignal);
-  FRIEND_TEST_ALL_PREFIXES(PromoResourceServiceTest, UnpackPromoSignal);
-  FRIEND_TEST_ALL_PREFIXES(PromoResourceServiceTest, UnpackWebStoreSignal);
-
-  // Identifies types of Chrome builds for promo targeting.
-  enum BuildType {
-    NO_BUILD = 0,
-    DEV_BUILD = 1,
-    BETA_BUILD = 1 << 1,
-    STABLE_BUILD = 1 << 2,
-    CANARY_BUILD = 1 << 3,
-  };
-
-  virtual ~PromoResourceService();
-
-  int GetPromoServiceVersion();
-
-  // Gets the locale of the last promos fetched from the server. This is saved
-  // so we can fetch new data if the locale changes.
-  std::string GetPromoLocale();
-
-  void Init();
-
-  // Returns true if |builds_targeted| includes the release channel Chrome
-  // belongs to. For testing purposes, you can override the current channel
-  // with set_channel.
-  bool IsThisBuildTargeted(int builds_targeted);
-
-  // Schedule a notification that a web resource is either going to become
-  // available or be no longer valid.
-  void ScheduleNotification(double ms_start_time, double ms_end_time);
-
-  // Schedules the initial notification for when the web resource is going
-  // to become available or no longer valid. This performs a few additional
-  // checks than ScheduleNotification, namely it schedules updates immediately
-  // if the promo service or Chrome locale has changed.
-  void ScheduleNotificationOnInit();
-
-  // Overrides the current Chrome release channel for testing purposes.
-  void set_channel(const char* channel) { channel_ = channel; }
-
-  virtual void Unpack(const DictionaryValue& parsed_json);
-
-  // Unpack the web resource as a custom promo signal. Expects a start and end
-  // signal, with the promo to be shown in the tooltip of the start signal
-  // field. Delivery will be in json in the form of:
-  // {
-  //   "topic": {
-  //     "answers": [
-  //       {
-  //         "answer_id": "1067976",
-  //         "name": "promo_start",
-  //         "question": "1:24",
-  //         "tooltip":
-  //       "Click \u003ca href=http://www.google.com\u003ehere\u003c/a\u003e!",
-  //         "inproduct": "10/8/09 12:00",
-  //         "inproduct_target": null
-  //       },
-  //       {
-  //         "answer_id": "1067976",
-  //         "name": "promo_end",
-  //         "question": "",
-  //         "tooltip": "",
-  //         "inproduct": "10/8/11 12:00",
-  //         "inproduct_target": null
-  //       },
-  //       ...
-  //     ]
-  //   }
-  // }
-  //
-  // Because the promo signal data is piggybacked onto the tip server, the
-  // values don't exactly correspond with the field names:
-  //
-  // For "promo_start" or "promo_end", the date to start or stop showing the
-  // promotional line is given by the "inproduct" line.
-  // For "promo_start", the promotional line itself is given in the "tooltip"
-  // field. The "question" field gives the type of builds that should be shown
-  // this promo (see the BuildType enum in web_resource_service.cc) and the
-  // number of hours that each promo group should see it, separated by ":".
-  // For example, "7:24" would indicate that all builds should see the promo,
-  // and each group should see it for 24 hours.
-  //
-  void UnpackPromoSignal(const DictionaryValue& parsed_json);
-
-  // Unpack the promo resource as a custom logo signal. Expects a start and end
-  // signal. Delivery will be in json in the form of:
-  // {
-  //   "topic": {
-  //     "answers": [
-  //       {
-  //         "answer_id": "107366",
-  //         "name": "custom_logo_start",
-  //         "question": "",
-  //         "tooltip": "",
-  //         "inproduct": "10/8/09 12:00",
-  //         "inproduct_target": null
-  //       },
-  //       {
-  //         "answer_id": "107366",
-  //         "name": "custom_logo_end",
-  //         "question": "",
-  //         "tooltip": "",
-  //         "inproduct": "10/8/09 12:00",
-  //         "inproduct_target": null
-  //       },
-  //       ...
-  //     ]
-  //   }
-  // }
-  //
-  void UnpackLogoSignal(const DictionaryValue& parsed_json);
-
-  // Unpack the web store promo. Expects JSON delivery in the following format:
-  // {
-  //   "topic": {
-  //     "answers": [
-  //       {
-  //         "answer_id": "1143011",
-  //         "name": "webstore_promo:15",
-  //         "question": "Browse thousands of apps and games for Chrome.",
-  //         "inproduct_target": "Visit the Chrome Web Store",
-  //         "inproduct": "https://chrome.google.com/webstore?hl=en",
-  //         "tooltip": "No thanks, hide this"
-  //       },
-  //       ...
-  //     ]
-  //   }
-  // }
-  // The properties are defined as follows:
-  //   inproduct: the release channels targeted (bitwise or of BuildTypes)
-  //   question: the promo header text
-  //   inproduct_target: the promo button text
-  //   inproduct: the promo button link
-  //   tooltip: the text for the "hide this" link on the promo
-  //   name: starts with "webstore_promo" to identify the signal. the second
-  //         part contains the release channels targeted (bitwise or of
-  //         BuildTypes)
-  //   answer_id: the promo's id
-  void UnpackWebStoreSignal(const DictionaryValue& parsed_json);
-
-  // Gets mutable dictionary attached to user's preferences, so that we
-  // can write resource data back to user's pref file.
-  DictionaryValue* web_resource_cache_;
-
-  // Overrides the current Chrome release channel for testing purposes.
-  const char* channel_;
-
-  DISALLOW_COPY_AND_ASSIGN(PromoResourceService);
-};
-
-#endif  // CHROME_BROWSER_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/web_resource/promo_resource_service_unittest.cc chromium-browser-12.0.742.112~r90304/src/chrome/browser/web_resource/promo_resource_service_unittest.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/browser/web_resource/promo_resource_service_unittest.cc	2011-06-08 00:43:31.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/browser/web_resource/promo_resource_service_unittest.cc	1970-01-01 01:00:00.000000000 +0100
@@ -1,268 +0,0 @@
-// Copyright (c) 2011 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 "base/json/json_reader.h"
-#include "base/time.h"
-#include "base/utf_string_conversions.h"
-#include "base/values.h"
-#include "chrome/browser/extensions/apps_promo.h"
-#include "chrome/browser/prefs/browser_prefs.h"
-#include "chrome/browser/prefs/pref_service.h"
-#include "chrome/browser/web_resource/promo_resource_service.h"
-#include "chrome/common/pref_names.h"
-#include "chrome/test/testing_browser_process.h"
-#include "chrome/test/testing_pref_service.h"
-#include "chrome/test/testing_profile.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-typedef testing::Test PromoResourceServiceTest;
-
-// Verifies that custom dates read from a web resource server are written to
-// the preferences file.
-TEST_F(PromoResourceServiceTest, UnpackLogoSignal) {
-  // Set up a testing profile and create a promo resource service.
-  TestingProfile profile;
-  TestingPrefService local_state;
-  TestingBrowserProcess* testing_browser_process =
-      static_cast<TestingBrowserProcess*>(g_browser_process);
-  testing_browser_process->SetPrefService(&local_state);
-  browser::RegisterLocalState(&local_state);
-
-  scoped_refptr<PromoResourceService> web_resource_service(
-      new PromoResourceService(&profile));
-
-  // Set up start and end dates in a Dictionary as if parsed from the service.
-  std::string json = "{ "
-                     "  \"topic\": {"
-                     "    \"answers\": ["
-                     "       {"
-                     "        \"name\": \"custom_logo_start\","
-                     "        \"inproduct\": \"31/01/10 01:00 GMT\""
-                     "       },"
-                     "       {"
-                     "        \"name\": \"custom_logo_end\","
-                     "        \"inproduct\": \"31/01/12 01:00 GMT\""
-                     "       }"
-                     "    ]"
-                     "  }"
-                     "}";
-  scoped_ptr<DictionaryValue> test_json(static_cast<DictionaryValue*>(
-      base::JSONReader::Read(json, false)));
-
-  // Check that prefs are set correctly.
-  web_resource_service->UnpackLogoSignal(*(test_json.get()));
-  PrefService* prefs = profile.GetPrefs();
-  ASSERT_TRUE(prefs != NULL);
-
-  double logo_start =
-      prefs->GetDouble(prefs::kNTPCustomLogoStart);
-  EXPECT_EQ(logo_start, 1264899600);  // unix epoch for Jan 31 2010 0100 GMT.
-  double logo_end =
-      prefs->GetDouble(prefs::kNTPCustomLogoEnd);
-  EXPECT_EQ(logo_end, 1327971600);  // unix epoch for Jan 31 2012 0100 GMT.
-
-  // Change the start only and recheck.
-  json = "{ "
-         "  \"topic\": {"
-         "    \"answers\": ["
-         "       {"
-         "        \"name\": \"custom_logo_start\","
-         "        \"inproduct\": \"28/02/10 14:00 GMT\""
-         "       },"
-         "       {"
-         "        \"name\": \"custom_logo_end\","
-         "        \"inproduct\": \"31/01/12 01:00 GMT\""
-         "       }"
-         "    ]"
-         "  }"
-         "}";
-  test_json->Clear();
-  test_json.reset(static_cast<DictionaryValue*>(
-      base::JSONReader::Read(json, false)));
-
-  // Check that prefs are set correctly.
-  web_resource_service->UnpackLogoSignal(*(test_json.get()));
-
-  logo_start = prefs->GetDouble(prefs::kNTPCustomLogoStart);
-  EXPECT_EQ(logo_start, 1267365600);  // date changes to Feb 28 2010 1400 GMT.
-
-  // If no date is included in the prefs, reset custom logo dates to 0.
-  json = "{ "
-         "  \"topic\": {"
-         "    \"answers\": ["
-         "       {"
-         "       }"
-         "    ]"
-         "  }"
-         "}";
-  test_json->Clear();
-  test_json.reset(static_cast<DictionaryValue*>(
-      base::JSONReader::Read(json, false)));
-
-  // Check that prefs are set correctly.
-  web_resource_service->UnpackLogoSignal(*(test_json.get()));
-  logo_start = prefs->GetDouble(prefs::kNTPCustomLogoStart);
-  EXPECT_EQ(logo_start, 0);  // date value reset to 0;
-  logo_end = prefs->GetDouble(prefs::kNTPCustomLogoEnd);
-  EXPECT_EQ(logo_end, 0);  // date value reset to 0;
-
-  testing_browser_process->SetPrefService(NULL);
-}
-
-TEST_F(PromoResourceServiceTest, UnpackPromoSignal) {
-  // Set up a testing profile and create a promo resource service.
-  TestingProfile profile;
-  TestingPrefService local_state;
-  TestingBrowserProcess* testing_browser_process =
-      static_cast<TestingBrowserProcess*>(g_browser_process);
-  testing_browser_process->SetPrefService(&local_state);
-  browser::RegisterLocalState(&local_state);
-
-  scoped_refptr<PromoResourceService> web_resource_service(
-      new PromoResourceService(&profile));
-
-  // Set up start and end dates and promo line in a Dictionary as if parsed
-  // from the service.
-  std::string json = "{ "
-                     "  \"topic\": {"
-                     "    \"answers\": ["
-                     "       {"
-                     "        \"name\": \"promo_start\","
-                     "        \"question\": \"3:2\","
-                     "        \"tooltip\": \"Eat more pie!\","
-                     "        \"inproduct\": \"31/01/10 01:00 GMT\""
-                     "       },"
-                     "       {"
-                     "        \"name\": \"promo_end\","
-                     "        \"inproduct\": \"31/01/12 01:00 GMT\""
-                     "       }"
-                     "    ]"
-                     "  }"
-                     "}";
-  scoped_ptr<DictionaryValue> test_json(static_cast<DictionaryValue*>(
-      base::JSONReader::Read(json, false)));
-
-  // Initialize a message loop for this to run on.
-  MessageLoop loop;
-
-  // Check that prefs are set correctly.
-  web_resource_service->UnpackPromoSignal(*(test_json.get()));
-  PrefService* prefs = profile.GetPrefs();
-  ASSERT_TRUE(prefs != NULL);
-
-  std::string promo_line = prefs->GetString(prefs::kNTPPromoLine);
-  EXPECT_EQ(promo_line, "Eat more pie!");
-
-  int promo_group = prefs->GetInteger(prefs::kNTPPromoGroup);
-  EXPECT_GE(promo_group, 0);
-  EXPECT_LT(promo_group, 16);
-
-  int promo_build_type = prefs->GetInteger(prefs::kNTPPromoBuild);
-  EXPECT_EQ(promo_build_type & PromoResourceService::DEV_BUILD,
-            PromoResourceService::DEV_BUILD);
-  EXPECT_EQ(promo_build_type & PromoResourceService::BETA_BUILD,
-            PromoResourceService::BETA_BUILD);
-  EXPECT_EQ(promo_build_type & PromoResourceService::STABLE_BUILD, 0);
-
-  int promo_time_slice = prefs->GetInteger(prefs::kNTPPromoGroupTimeSlice);
-  EXPECT_EQ(promo_time_slice, 2);
-
-  double promo_start =
-      prefs->GetDouble(prefs::kNTPPromoStart);
-  int64 actual_start = 1264899600 +  // unix epoch for Jan 31 2010 0100 GMT.
-      promo_group * 2 * 60 * 60;
-  EXPECT_EQ(promo_start, actual_start);
-
-  double promo_end =
-      prefs->GetDouble(prefs::kNTPPromoEnd);
-  EXPECT_EQ(promo_end, 1327971600);  // unix epoch for Jan 31 2012 0100 GMT.
-
-  testing_browser_process->SetPrefService(NULL);
-}
-
-TEST_F(PromoResourceServiceTest, UnpackWebStoreSignal) {
-  // Set up a testing profile and create a promo resource service.
-  TestingProfile profile;
-  TestingPrefService local_state;
-  TestingBrowserProcess* testing_browser_process =
-      static_cast<TestingBrowserProcess*>(g_browser_process);
-  testing_browser_process->SetPrefService(&local_state);
-
-  browser::RegisterLocalState(&local_state);
-
-  scoped_refptr<PromoResourceService> web_resource_service(
-      new PromoResourceService(&profile));
-
-  web_resource_service->set_channel("dev");
-
-  // Set up start and end dates and promo line in a Dictionary as if parsed
-  // from the service.
-  std::string json = "{ "
-                     "  \"topic\": {"
-                     "    \"answers\": ["
-                     "       {"
-                     "        \"answer_id\": \"341252\","
-                     "        \"name\": \"webstore_promo:15\","
-                     "        \"question\": \"The header!\","
-                     "        \"inproduct_target\": \"The button label!\","
-                     "        \"inproduct\": \"http://link.com\","
-                     "        \"tooltip\": \"No thanks, hide this.\""
-                     "       }"
-                     "    ]"
-                     "  }"
-                     "}";
-  scoped_ptr<DictionaryValue> test_json(static_cast<DictionaryValue*>(
-      base::JSONReader::Read(json, false)));
-
-  // Initialize a message loop for this to run on.
-  MessageLoop loop;
-
-  // Check that prefs are set correctly.
-  web_resource_service->UnpackWebStoreSignal(*(test_json.get()));
-  PrefService* prefs = profile.GetPrefs();
-  ASSERT_TRUE(prefs != NULL);
-
-  EXPECT_EQ("341252", AppsPromo::GetPromoId());
-  EXPECT_EQ("The header!", AppsPromo::GetPromoHeaderText());
-  EXPECT_EQ("The button label!", AppsPromo::GetPromoButtonText());
-  EXPECT_EQ(GURL("http://link.com"), AppsPromo::GetPromoLink());
-  EXPECT_EQ("No thanks, hide this.", AppsPromo::GetPromoExpireText());
-
-  testing_browser_process->SetPrefService(NULL);
-}
-
-TEST_F(PromoResourceServiceTest, IsBuildTargeted) {
-  // canary
-  EXPECT_FALSE(PromoResourceService::IsBuildTargeted("canary", 1));
-  EXPECT_FALSE(PromoResourceService::IsBuildTargeted("canary", 3));
-  EXPECT_FALSE(PromoResourceService::IsBuildTargeted("canary", 7));
-  EXPECT_TRUE(PromoResourceService::IsBuildTargeted("canary", 15));
-  EXPECT_TRUE(PromoResourceService::IsBuildTargeted("canary", 8));
-  EXPECT_TRUE(PromoResourceService::IsBuildTargeted("canary", 11));
-
-  // dev
-  EXPECT_TRUE(PromoResourceService::IsBuildTargeted("dev", 1));
-  EXPECT_TRUE(PromoResourceService::IsBuildTargeted("dev", 3));
-  EXPECT_TRUE(PromoResourceService::IsBuildTargeted("dev", 7));
-  EXPECT_TRUE(PromoResourceService::IsBuildTargeted("dev", 15));
-  EXPECT_FALSE(PromoResourceService::IsBuildTargeted("dev", 8));
-  EXPECT_TRUE(PromoResourceService::IsBuildTargeted("dev", 11));
-
-  // beta
-  EXPECT_FALSE(PromoResourceService::IsBuildTargeted("beta", 1));
-  EXPECT_TRUE(PromoResourceService::IsBuildTargeted("beta", 3));
-  EXPECT_TRUE(PromoResourceService::IsBuildTargeted("beta", 7));
-  EXPECT_TRUE(PromoResourceService::IsBuildTargeted("beta", 15));
-  EXPECT_FALSE(PromoResourceService::IsBuildTargeted("beta", 8));
-  EXPECT_TRUE(PromoResourceService::IsBuildTargeted("beta", 11));
-
-  // stable
-  EXPECT_FALSE(PromoResourceService::IsBuildTargeted("", 1));
-  EXPECT_FALSE(PromoResourceService::IsBuildTargeted("", 3));
-  EXPECT_TRUE(PromoResourceService::IsBuildTargeted("", 7));
-  EXPECT_TRUE(PromoResourceService::IsBuildTargeted("", 15));
-  EXPECT_FALSE(PromoResourceService::IsBuildTargeted("", 8));
-  EXPECT_FALSE(PromoResourceService::IsBuildTargeted("", 11));
-  EXPECT_TRUE(PromoResourceService::IsBuildTargeted("", 12));
-}
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/chrome_browser.gypi chromium-browser-12.0.742.112~r90304/src/chrome/chrome_browser.gypi
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/chrome_browser.gypi	2011-06-08 00:44:08.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/chrome_browser.gypi	2011-07-16 15:23:30.920000249 +0200
@@ -843,8 +843,6 @@
         'browser/download/save_types.h',
         'browser/enumerate_modules_model_win.cc',
         'browser/enumerate_modules_model_win.h',
-        'browser/extensions/apps_promo.cc',
-        'browser/extensions/apps_promo.h',
         'browser/extensions/convert_user_script.cc',
         'browser/extensions/convert_user_script.h',
         'browser/extensions/convert_web_app.cc',
@@ -1278,8 +1276,6 @@
         'browser/instant/instant_loader_manager.h',
         'browser/instant/instant_unload_handler.cc',
         'browser/instant/instant_unload_handler.h',
-        'browser/instant/promo_counter.cc',
-        'browser/instant/promo_counter.h',
         'browser/intranet_redirect_detector.cc',
         'browser/intranet_redirect_detector.h',
         'browser/io_thread.cc',
@@ -3396,8 +3392,6 @@
         'browser/web_applications/web_app.h',
         'browser/web_resource/gpu_blacklist_updater.cc',
         'browser/web_resource/gpu_blacklist_updater.h',
-        'browser/web_resource/promo_resource_service.cc',
-        'browser/web_resource/promo_resource_service.h',
         'browser/web_resource/web_resource_service.cc',
         'browser/web_resource/web_resource_service.h',
         'browser/webdata/autofill_change.cc',
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/chrome_tests.gypi chromium-browser-12.0.742.112~r90304/src/chrome/chrome_tests.gypi
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/chrome_tests.gypi	2011-06-08 00:44:08.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/chrome_tests.gypi	2011-07-16 15:24:12.344000251 +0200
@@ -1324,7 +1324,6 @@
         'browser/download/mock_download_manager.h',
         'browser/download/save_package_unittest.cc',
         'browser/enumerate_modules_model_unittest_win.cc',
-        'browser/extensions/apps_promo_unittest.cc',
         'browser/extensions/convert_user_script_unittest.cc',
         'browser/extensions/convert_web_app_unittest.cc',
         'browser/extensions/extension_event_router_forwarder_unittest.cc',
@@ -1397,7 +1396,6 @@
         'browser/importer/safari_importer_unittest.mm',
         'browser/importer/toolbar_importer_unittest.cc',
         'browser/instant/instant_loader_manager_unittest.cc',
-        'browser/instant/promo_counter_unittest.cc',
         'browser/keychain_mock_mac.cc',
         'browser/keychain_mock_mac.h',
         'browser/mach_broker_mac_unittest.cc',
@@ -1788,7 +1786,6 @@
         'browser/webdata/web_data_service_test_util.h',
         'browser/webdata/web_data_service_unittest.cc',
         'browser/webdata/web_database_migration_unittest.cc',
-        'browser/web_resource/promo_resource_service_unittest.cc',
         'common/bzip2_unittest.cc',
         'common/child_process_logging_mac_unittest.mm',
         'common/chrome_paths_unittest.cc',
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/common/chrome_switches.cc chromium-browser-12.0.742.112~r90304/src/chrome/common/chrome_switches.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/common/chrome_switches.cc	2011-06-08 00:43:49.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/common/chrome_switches.cc	2011-07-16 15:24:49.960000248 +0200
@@ -545,10 +545,6 @@
 // whether or not it's actually the first run.
 const char kFirstRun[]                      = "first-run";
 
-// Forces the apps/webstore promo to be shown, independent of whether it has
-// timed out, etc. Useful for testing.
-const char kForceAppsPromoVisible[]         = "force-apps-promo-visible";
-
 // If accelerated compositing is supported, always enter compositing mode for
 // the base layer even when compositing is not strictly required.
 const char kForceCompositingMode[]          = "force-compositing-mode";
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/common/extensions/extension_constants.cc chromium-browser-12.0.742.112~r90304/src/chrome/common/extensions/extension_constants.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/common/extensions/extension_constants.cc	2011-06-08 00:43:47.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/common/extensions/extension_constants.cc	2011-07-16 15:26:13.148000255 +0200
@@ -374,7 +374,6 @@
 namespace extension_misc {
 const char* kBookmarkManagerId = "eemcgdkfndhakfknompkggombfjjjeno";
 const char* kWebStoreAppId = "ahfgeienlihckogmohjhadlkjgocpleb";
-const char* kAppsPromoHistogram = "Extensions.AppsPromo";
 const char* kAppLaunchHistogram = "Extensions.AppLaunch";
 #if defined(OS_CHROMEOS)
 const char* kAccessExtensionPath =
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/common/extensions/extension_constants.h chromium-browser-12.0.742.112~r90304/src/chrome/common/extensions/extension_constants.h
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/common/extensions/extension_constants.h	2011-06-08 00:43:47.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/common/extensions/extension_constants.h	2011-07-16 15:25:23.700000310 +0200
@@ -280,19 +280,6 @@
     LAUNCH_TAB
   };
 
-  // The name of the apps promo histogram.
-  extern const char* kAppsPromoHistogram;
-
-  // The buckets used in the apps promo histogram.
-  enum AppsPromoBuckets {
-    PROMO_LAUNCH_APP,
-    PROMO_LAUNCH_WEB_STORE,
-    PROMO_CLOSE,
-    PROMO_EXPIRE,
-    PROMO_SEEN,
-    PROMO_BUCKET_BOUNDARY
-  };
-
   // The name of the app launch histogram.
   extern const char* kAppLaunchHistogram;
 
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/common/pref_names.cc chromium-browser-12.0.742.112~r90304/src/chrome/common/pref_names.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/common/pref_names.cc	2011-06-08 00:43:49.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/common/pref_names.cc	2011-07-16 15:29:34.152000250 +0200
@@ -9,10 +9,6 @@
 // *************** PROFILE PREFS ***************
 // These are attached to the user profile
 
-// A counter that controls whether the apps promo is shown in the app launcher
-// or not.
-const char kAppsPromoCounter[] = "apps_promo_counter";
-
 // Whether we have installed default apps yet in this profile.
 const char kDefaultAppsInstalled[] = "default_apps_installed";
 
@@ -261,10 +257,6 @@
 // Time when instant was last enabled.
 const char kInstantEnabledTime[] = "instant.enabled_time";
 
-// Used to maintain instant promo keys. See PromoCounter for details of subkeys
-// that are used.
-const char kInstantPromo[] = "instant.promo";
-
 // Used to migrate preferences from local state to user preferences to
 // enable multiple profiles.
 // BITMASK with possible values (see browser_prefs.cc for enum):
@@ -1064,16 +1056,6 @@
 // Page.
 const char kNTPMostVisitedPinnedURLs[] = "ntp.pinned_urls";
 
-// Data downloaded from promo resource pages (JSON, RSS) to be used to
-// dynamically deliver data for the new tab page.
-const char kNTPPromoResourceCache[] = "ntp.promo_resource_cache";
-
-// Last time of update of promo_resource_cache.
-const char kNTPPromoResourceCacheUpdate[] = "ntp.promo_resource_cache_update";
-
-// Serves promo resources for the NTP.
-const char kNTPPromoResourceServer[] = "ntp.web_resource_server";
-
 // Serves tips for the NTP.
 const char kNTPTipsResourceServer[] = "ntp.tips_resource_server";
 
@@ -1096,52 +1078,6 @@
 const char kNTPCustomLogoStart[] = "ntp.alt_logo_start";
 const char kNTPCustomLogoEnd[] = "ntp.alt_logo_end";
 
-// The promo resource service version number.
-const char kNTPPromoVersion[] = "ntp.promo_version";
-
-// The last locale the promo was fetched for.
-const char kNTPPromoLocale[] = "ntp.promo_locale";
-
-// Whether promo should be shown to Dev builds, Beta and Dev, or all builds.
-const char kNTPPromoBuild[] = "ntp.promo_build";
-
-// True if user has explicitly closed the promo line.
-const char kNTPPromoClosed[] = "ntp.promo_closed";
-
-// Users are randomly divided into 16 groups in order to slowly roll out
-// special promos.
-const char kNTPPromoGroup[] = "ntp.promo_group";
-
-// Amount of time each promo group should be shown a promo that is being slowly
-// rolled out, in hours.
-const char kNTPPromoGroupTimeSlice[] = "ntp.promo_group_timeslice";
-
-// Promo line from server.
-const char kNTPPromoLine[] = "ntp.promo_line";
-
-// Dates between which the NTP should show a promotional line downloaded
-// from the promo server.
-const char kNTPPromoStart[] = "ntp.promo_start";
-const char kNTPPromoEnd[] = "ntp.promo_end";
-
-// The id of the last web store promo actually displayed on the NTP.
-const char kNTPWebStorePromoLastId[] = "ntp.webstore_last_promo_id";
-
-// The id of the current web store promo.
-const char kNTPWebStorePromoId[] = "ntp.webstorepromo.id";
-
-// The header line for the NTP web store promo.
-const char kNTPWebStorePromoHeader[] = "ntp.webstorepromo.header";
-
-// The button text for the NTP web store promo.
-const char kNTPWebStorePromoButton[] = "ntp.webstorepromo.button";
-
-// The button link for the NTP web store promo.
-const char kNTPWebStorePromoLink[] = "ntp.webstorepromo.link";
-
-// The "hide this" link text for the NTP web store promo.
-const char kNTPWebStorePromoExpire[] = "ntp.webstorepromo.expire";
-
 // The most up-to-date GPU blacklist downloaded from the web, which replaces
 // the one that's installed with chrome.
 const char kGpuBlacklist[] = "gpu_blacklist";
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/common/pref_names.h chromium-browser-12.0.742.112~r90304/src/chrome/common/pref_names.h
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/common/pref_names.h	2011-06-08 00:43:49.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/common/pref_names.h	2011-07-16 15:28:29.892000251 +0200
@@ -13,7 +13,6 @@
 namespace prefs {
 
 // Profile prefs. Please add Local State prefs below instead.
-extern const char kAppsPromoCounter[];
 extern const char kDefaultAppsInstalled[];
 extern const char kHomePageIsNewTabPage[];
 extern const char kHomePage[];
@@ -90,7 +89,6 @@
 extern const char kInstantEnabled[];
 extern const char kInstantEnabledOnce[];
 extern const char kInstantEnabledTime[];
-extern const char kInstantPromo[];
 extern const char kMultipleProfilePrefMigration[];
 extern const char kNetworkPredictionEnabled[];
 #if defined(OS_CHROMEOS)
@@ -377,29 +375,11 @@
 
 extern const char kNTPMostVisitedURLsBlacklist[];
 extern const char kNTPMostVisitedPinnedURLs[];
-extern const char kNTPPromoResourceCache[];
-extern const char kNTPPromoResourceCacheUpdate[];
-extern const char kNTPPromoResourceServer[];
 extern const char kNTPDateResourceServer[];
 extern const char kNTPShownSections[];
 extern const char kNTPPrefVersion[];
 extern const char kNTPCustomLogoStart[];
 extern const char kNTPCustomLogoEnd[];
-extern const char kNTPPromoVersion[];
-extern const char kNTPPromoLocale[];
-extern const char kNTPPromoStart[];
-extern const char kNTPPromoEnd[];
-extern const char kNTPPromoLine[];
-extern const char kNTPPromoClosed[];
-extern const char kNTPPromoGroup[];
-extern const char kNTPPromoGroupTimeSlice[];
-extern const char kNTPPromoBuild[];
-extern const char kNTPWebStorePromoLastId[];
-extern const char kNTPWebStorePromoId[];
-extern const char kNTPWebStorePromoHeader[];
-extern const char kNTPWebStorePromoButton[];
-extern const char kNTPWebStorePromoLink[];
-extern const char kNTPWebStorePromoExpire[];
 
 extern const char kGpuBlacklist[];
 extern const char kGpuBlacklistUpdate[];
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/test/data/extensions/profiles/extension_webrequest/Default/Preferences chromium-browser-12.0.742.112~r90304/src/chrome/test/data/extensions/profiles/extension_webrequest/Default/Preferences
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/test/data/extensions/profiles/extension_webrequest/Default/Preferences	2011-06-08 00:41:24.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/test/data/extensions/profiles/extension_webrequest/Default/Preferences	2011-07-16 15:33:14.916000256 +0200
@@ -55,7 +55,6 @@
    },
    "ntp": {
       "pref_version": 3,
-      "promo_resource_cache_update": "1298943121.229765"
    },
    "plugins": {
       "enabled_internal_pdf3": true
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/test/functional/extensions.py chromium-browser-12.0.742.112~r90304/src/chrome/test/functional/extensions.py
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/test/functional/extensions.py	2011-06-08 00:39:37.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/test/functional/extensions.py	2011-07-16 15:32:17.108000252 +0200
@@ -153,14 +153,15 @@
     # ensure that the only app present in the NTP is the "Web Store" app.  Then,
     # we update the extensions, and verify that afterward, the two promo apps
     # are installed in addition to the "Web Store" app.
-    app_info = self.GetNTPApps()
-    self.assertTrue(len(app_info) == 1 and 'name' in app_info[0] and
-                    app_info[0]['name'] == 'Chrome Web Store',
-                    msg='Web Store not present in NTP in fresh profile.')
-    self.UpdateExtensionsNow()
-    app_info = self.GetNTPApps()
-    self.assertEqual(len(app_info), 3,
-                     msg='Error verifying promo apps after extension update.')
+    #app_info = self.GetNTPApps()
+    #self.assertTrue(len(app_info) == 1 and 'name' in app_info[0] and
+    #                app_info[0]['name'] == 'Chrome Web Store',
+    #                msg='Web Store not present in NTP in fresh profile.')
+    #self.UpdateExtensionsNow()
+    #app_info = self.GetNTPApps()
+    #self.assertEqual(len(app_info), 3,
+    #                 msg='Error verifying promo apps after extension update.')
+		return
 
 
 if __name__ == '__main__':
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/test/testing_profile.cc chromium-browser-12.0.742.112~r90304/src/chrome/test/testing_profile.cc
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/test/testing_profile.cc	2011-06-08 00:42:25.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/test/testing_profile.cc	2011-07-16 15:30:24.424000249 +0200
@@ -772,10 +772,6 @@
   return NULL;
 }
 
-PromoCounter* TestingProfile::GetInstantPromoCounter() {
-  return NULL;
-}
-
 policy::ProfilePolicyConnector* TestingProfile::GetPolicyConnector() {
   return NULL;
 }
diff -x '*.pyc' -x '*.tmp' -x '*.Makefile' -x '*.mk' -Naur orig/chromium-browser-12.0.742.112~r90304/src/chrome/test/testing_profile.h chromium-browser-12.0.742.112~r90304/src/chrome/test/testing_profile.h
--- orig/chromium-browser-12.0.742.112~r90304/src/chrome/test/testing_profile.h	2011-06-08 00:42:25.000000000 +0200
+++ chromium-browser-12.0.742.112~r90304/src/chrome/test/testing_profile.h	2011-07-16 15:30:35.124000252 +0200
@@ -250,7 +250,6 @@
   virtual WebKitContext* GetOffTheRecordWebKitContext();
   virtual void MarkAsCleanShutdown() {}
   virtual void InitExtensions(bool extensions_enabled) {}
-  virtual void InitPromoResources() {}
   virtual void InitRegisteredProtocolHandlers() {}
   virtual NTPResourceCache* GetNTPResourceCache();
 
@@ -283,7 +282,6 @@
   virtual CloudPrintProxyService* GetCloudPrintProxyService();
   virtual ChromeBlobStorageContext* GetBlobStorageContext();
   virtual ExtensionInfoMap* GetExtensionInfoMap();
-  virtual PromoCounter* GetInstantPromoCounter();
   virtual policy::ProfilePolicyConnector* GetPolicyConnector();
   virtual ChromeURLDataManager* GetChromeURLDataManager();
   virtual prerender::PrerenderManager* GetPrerenderManager();
