summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-09 23:47:27 +0000
committerjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-09 23:47:27 +0000
commitd7d15d7ee5c5db773c7cdefff9ca0ff85891b635 (patch)
tree4c6734b0cc0f3f4faa31488a17de83d2ac68bde7
parent57ab1ce259d663cd0b9c9df7a8c0c315a9558abd (diff)
downloadchromium_src-d7d15d7ee5c5db773c7cdefff9ca0ff85891b635.zip
chromium_src-d7d15d7ee5c5db773c7cdefff9ca0ff85891b635.tar.gz
chromium_src-d7d15d7ee5c5db773c7cdefff9ca0ff85891b635.tar.bz2
Reduce log spew of browser_tests on chromeos by 25%.
This was introduced in http://codereview.chromium.org/9460001/ BUG=114015,122432 TEST=Aura gestures are still persisted to local_state; browser_tests in chromeos log way less Review URL: http://codereview.chromium.org/9934001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131486 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/prefs/browser_prefs.cc3
-rw-r--r--chrome/browser/profiles/profile_dependency_manager.cc7
-rw-r--r--chrome/browser/ui/gesture_prefs.cc8
-rw-r--r--chrome/browser/ui/gesture_prefs.h15
-rw-r--r--chrome/browser/ui/views/ash/gesture_prefs_aura.cc190
-rw-r--r--chrome/browser/ui/views/ash/gesture_prefs_observer_factory_aura.cc224
-rw-r--r--chrome/browser/ui/views/ash/gesture_prefs_observer_factory_aura.h38
-rw-r--r--chrome/chrome_browser.gypi7
-rw-r--r--tools/valgrind/memcheck/suppressions.txt7
9 files changed, 271 insertions, 228 deletions
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index f55b89d..a1bf4ce 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -54,7 +54,6 @@
#include "chrome/browser/ui/alternate_error_tab_observer.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_init.h"
-#include "chrome/browser/ui/gesture_prefs.h"
#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
#include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
#include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
@@ -171,8 +170,6 @@ void RegisterLocalState(PrefService* local_state) {
#if defined(OS_MACOSX)
confirm_quit::RegisterLocalState(local_state);
#endif
-
- GesturePrefsRegisterPrefs(local_state);
}
void RegisterUserPrefs(PrefService* user_prefs) {
diff --git a/chrome/browser/profiles/profile_dependency_manager.cc b/chrome/browser/profiles/profile_dependency_manager.cc
index f225e6a..c8f79e1 100644
--- a/chrome/browser/profiles/profile_dependency_manager.cc
+++ b/chrome/browser/profiles/profile_dependency_manager.cc
@@ -39,6 +39,10 @@
#include "chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h"
#include "chrome/browser/user_style_sheet_watcher_factory.h"
+#if defined(USE_AURA)
+#include "chrome/browser/ui/views/ash/gesture_prefs_observer_factory_aura.h"
+#endif
+
#ifndef NDEBUG
#include "base/command_line.h"
#include "base/file_util.h"
@@ -170,6 +174,9 @@ void ProfileDependencyManager::AssertFactoriesBuilt() {
CookieSettings::Factory::GetInstance();
DownloadServiceFactory::GetInstance();
FindBarStateFactory::GetInstance();
+#if defined(USE_AURA)
+ GesturePrefsObserverFactoryAura::GetInstance();
+#endif
GlobalErrorServiceFactory::GetInstance();
NetworkActionPredictorFactory::GetInstance();
NTPResourceCacheFactory::GetInstance();
diff --git a/chrome/browser/ui/gesture_prefs.cc b/chrome/browser/ui/gesture_prefs.cc
deleted file mode 100644
index 8636050..0000000
--- a/chrome/browser/ui/gesture_prefs.cc
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2012 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/ui/gesture_prefs.h"
-
-void GesturePrefsRegisterPrefs(PrefService* prefs) {
-}
diff --git a/chrome/browser/ui/gesture_prefs.h b/chrome/browser/ui/gesture_prefs.h
deleted file mode 100644
index e19bcb9..0000000
--- a/chrome/browser/ui/gesture_prefs.h
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) 2012 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_UI_GESTURE_PREFS_H_
-#define CHROME_BROWSER_UI_GESTURE_PREFS_H_
-#pragma once
-
-#include "base/compiler_specific.h"
-
-class PrefService;
-
-void GesturePrefsRegisterPrefs(PrefService* prefs);
-
-#endif // CHROME_BROWSER_UI_GESTURE_PREFS_H_
diff --git a/chrome/browser/ui/views/ash/gesture_prefs_aura.cc b/chrome/browser/ui/views/ash/gesture_prefs_aura.cc
deleted file mode 100644
index ece9c70..0000000
--- a/chrome/browser/ui/views/ash/gesture_prefs_aura.cc
+++ /dev/null
@@ -1,190 +0,0 @@
-// Copyright (c) 2012 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/memory/singleton.h"
-#include "chrome/browser/browser_process.h"
-#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "chrome/browser/prefs/pref_service.h"
-#include "chrome/browser/ui/gesture_prefs.h"
-#include "chrome/common/chrome_notification_types.h"
-#include "chrome/common/pref_names.h"
-#include "content/public/browser/notification_observer.h"
-#include "ui/base/gestures/gesture_configuration.h"
-
-using ui::GestureConfiguration;
-
-namespace {
-
-// This class manages gesture configuration preferences.
-class GesturePrefsObserverAura : public content::NotificationObserver {
- public:
- static GesturePrefsObserverAura *GetInstance();
- void RegisterPrefs(PrefService* prefs);
-
- private:
- GesturePrefsObserverAura();
- friend struct DefaultSingletonTraits<GesturePrefsObserverAura>;
- virtual ~GesturePrefsObserverAura();
-
- // content::NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
- private:
- void Update();
-
- PrefChangeRegistrar registrar_;
- PrefService* local_state_;
- DISALLOW_COPY_AND_ASSIGN(GesturePrefsObserverAura);
-};
-
-// The list of prefs we want to observe.
-// Note that this collection of settings should correspond to the settings used
-// in ui/base/gestures/gesture_configuration.h
-const char* kPrefsToObserve[] = {
- prefs::kLongPressTimeInSeconds,
- prefs::kMaxSecondsBetweenDoubleClick,
- prefs::kMaxSeparationForGestureTouchesInPixels,
- prefs::kMaxTouchDownDurationInSecondsForClick,
- prefs::kMaxTouchMoveInPixelsForClick,
- prefs::kMinDistanceForPinchScrollInPixels,
- prefs::kMinFlickSpeedSquared,
- prefs::kMinPinchUpdateDistanceInPixels,
- prefs::kMinRailBreakVelocity,
- prefs::kMinScrollDeltaSquared,
- prefs::kMinTouchDownDurationInSecondsForClick,
- prefs::kPointsBufferedForVelocity,
- prefs::kRailBreakProportion,
- prefs::kRailStartProportion,
-};
-
-const int kPrefsToObserveLength = arraysize(kPrefsToObserve);
-
-GesturePrefsObserverAura::GesturePrefsObserverAura()
- : local_state_(0) {
-}
-
-GesturePrefsObserverAura::~GesturePrefsObserverAura() {
-}
-
-GesturePrefsObserverAura* GesturePrefsObserverAura::GetInstance() {
- return Singleton<GesturePrefsObserverAura,
- LeakySingletonTraits<GesturePrefsObserverAura> >::get();
-}
-
-void GesturePrefsObserverAura::RegisterPrefs(PrefService* local_state) {
- if (local_state_ == 0) {
- local_state_ = local_state;
-
- if (local_state_) {
- local_state->RegisterDoublePref(
- prefs::kLongPressTimeInSeconds,
- GestureConfiguration::long_press_time_in_seconds());
- local_state_->RegisterDoublePref(
- prefs::kMaxSecondsBetweenDoubleClick,
- GestureConfiguration::max_seconds_between_double_click());
- local_state_->RegisterDoublePref(
- prefs::kMaxSeparationForGestureTouchesInPixels,
- GestureConfiguration::max_separation_for_gesture_touches_in_pixels());
- local_state_->RegisterDoublePref(
- prefs::kMaxTouchDownDurationInSecondsForClick,
- GestureConfiguration::max_touch_down_duration_in_seconds_for_click());
- local_state_->RegisterDoublePref(
- prefs::kMaxTouchMoveInPixelsForClick,
- GestureConfiguration::max_touch_move_in_pixels_for_click());
- local_state->RegisterDoublePref(
- prefs::kMinDistanceForPinchScrollInPixels,
- GestureConfiguration::min_distance_for_pinch_scroll_in_pixels());
- local_state_->RegisterDoublePref(
- prefs::kMinFlickSpeedSquared,
- GestureConfiguration::min_flick_speed_squared());
- local_state->RegisterDoublePref(
- prefs::kMinPinchUpdateDistanceInPixels,
- GestureConfiguration::min_pinch_update_distance_in_pixels());
- local_state_->RegisterDoublePref(
- prefs::kMinRailBreakVelocity,
- GestureConfiguration::min_rail_break_velocity());
- local_state_->RegisterDoublePref(
- prefs::kMinScrollDeltaSquared,
- GestureConfiguration::min_scroll_delta_squared());
- local_state_->RegisterDoublePref(
- prefs::kMinTouchDownDurationInSecondsForClick,
- GestureConfiguration::min_touch_down_duration_in_seconds_for_click());
- local_state->RegisterIntegerPref(
- prefs::kPointsBufferedForVelocity,
- GestureConfiguration::points_buffered_for_velocity());
- local_state->RegisterDoublePref(
- prefs::kRailBreakProportion,
- GestureConfiguration::rail_break_proportion());
- local_state->RegisterDoublePref(
- prefs::kRailStartProportion,
- GestureConfiguration::rail_start_proportion());
-
- registrar_.Init(local_state_);
- registrar_.RemoveAll();
- for (int i = 0; i < kPrefsToObserveLength; ++i)
- registrar_.Add(kPrefsToObserve[i], this);
- }
- }
-}
-
-void GesturePrefsObserverAura::Update() {
- if (local_state_) {
- GestureConfiguration::set_long_press_time_in_seconds(
- local_state_->GetDouble(
- prefs::kLongPressTimeInSeconds));
- GestureConfiguration::set_max_seconds_between_double_click(
- local_state_->GetDouble(
- prefs::kMaxSecondsBetweenDoubleClick));
- GestureConfiguration::set_max_separation_for_gesture_touches_in_pixels(
- local_state_->GetDouble(
- prefs::kMaxSeparationForGestureTouchesInPixels));
- GestureConfiguration::set_max_touch_down_duration_in_seconds_for_click(
- local_state_->GetDouble(
- prefs::kMaxTouchDownDurationInSecondsForClick));
- GestureConfiguration::set_max_touch_move_in_pixels_for_click(
- local_state_->GetDouble(
- prefs::kMaxTouchMoveInPixelsForClick));
- GestureConfiguration::set_min_distance_for_pinch_scroll_in_pixels(
- local_state_->GetDouble(
- prefs::kMinDistanceForPinchScrollInPixels));
- GestureConfiguration::set_min_flick_speed_squared(
- local_state_->GetDouble(
- prefs::kMinFlickSpeedSquared));
- GestureConfiguration::set_min_pinch_update_distance_in_pixels(
- local_state_->GetDouble(
- prefs::kMinPinchUpdateDistanceInPixels));
- GestureConfiguration::set_min_rail_break_velocity(
- local_state_->GetDouble(
- prefs::kMinRailBreakVelocity));
- GestureConfiguration::set_min_scroll_delta_squared(
- local_state_->GetDouble(
- prefs::kMinScrollDeltaSquared));
- GestureConfiguration::set_min_touch_down_duration_in_seconds_for_click(
- local_state_->GetDouble(
- prefs::kMinTouchDownDurationInSecondsForClick));
- GestureConfiguration::set_points_buffered_for_velocity(
- local_state_->GetInteger(
- prefs::kPointsBufferedForVelocity));
- GestureConfiguration::set_rail_break_proportion(
- local_state_->GetDouble(
- prefs::kRailBreakProportion));
- GestureConfiguration::set_rail_start_proportion(
- local_state_->GetDouble(
- prefs::kRailStartProportion));
- }
-}
-
-void GesturePrefsObserverAura::Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- Update();
-}
-
-} // namespace
-
-void GesturePrefsRegisterPrefs(PrefService* prefs) {
- GesturePrefsObserverAura::GetInstance()->RegisterPrefs(prefs);
-}
diff --git a/chrome/browser/ui/views/ash/gesture_prefs_observer_factory_aura.cc b/chrome/browser/ui/views/ash/gesture_prefs_observer_factory_aura.cc
new file mode 100644
index 0000000..3414244
--- /dev/null
+++ b/chrome/browser/ui/views/ash/gesture_prefs_observer_factory_aura.cc
@@ -0,0 +1,224 @@
+// Copyright (c) 2012 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/ui/views/ash/gesture_prefs_observer_factory_aura.h"
+
+#include "base/compiler_specific.h"
+#include "chrome/browser/prefs/pref_change_registrar.h"
+#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_dependency_manager.h"
+#include "chrome/common/chrome_notification_types.h"
+#include "chrome/common/pref_names.h"
+#include "content/public/browser/notification_observer.h"
+#include "ui/base/gestures/gesture_configuration.h"
+
+using ui::GestureConfiguration;
+
+namespace {
+
+// This class manages gesture configuration preferences.
+class GesturePrefsObserver : public content::NotificationObserver,
+ public ProfileKeyedService {
+ public:
+ explicit GesturePrefsObserver(PrefService* prefs);
+ virtual ~GesturePrefsObserver();
+
+ // ProfileKeyedService implementation.
+ virtual void Shutdown() OVERRIDE;
+
+ // content::NotificationObserver implementation.
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
+ private:
+ void Update();
+
+ PrefChangeRegistrar registrar_;
+ PrefService* prefs_;
+
+ DISALLOW_COPY_AND_ASSIGN(GesturePrefsObserver);
+};
+
+// The list of prefs we want to observe.
+// Note that this collection of settings should correspond to the settings used
+// in ui/base/gestures/gesture_configuration.h
+const char* kPrefsToObserve[] = {
+ prefs::kLongPressTimeInSeconds,
+ prefs::kMaxSecondsBetweenDoubleClick,
+ prefs::kMaxSeparationForGestureTouchesInPixels,
+ prefs::kMaxTouchDownDurationInSecondsForClick,
+ prefs::kMaxTouchMoveInPixelsForClick,
+ prefs::kMinDistanceForPinchScrollInPixels,
+ prefs::kMinFlickSpeedSquared,
+ prefs::kMinPinchUpdateDistanceInPixels,
+ prefs::kMinRailBreakVelocity,
+ prefs::kMinScrollDeltaSquared,
+ prefs::kMinTouchDownDurationInSecondsForClick,
+ prefs::kPointsBufferedForVelocity,
+ prefs::kRailBreakProportion,
+ prefs::kRailStartProportion,
+};
+
+GesturePrefsObserver::GesturePrefsObserver(PrefService* prefs)
+ : prefs_(prefs) {
+ registrar_.Init(prefs);
+ registrar_.RemoveAll();
+ for (size_t i = 0; i < arraysize(kPrefsToObserve); ++i)
+ registrar_.Add(kPrefsToObserve[i], this);
+}
+
+GesturePrefsObserver::~GesturePrefsObserver() {}
+
+void GesturePrefsObserver::Shutdown() {
+ registrar_.RemoveAll();
+}
+
+void GesturePrefsObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ Update();
+}
+
+void GesturePrefsObserver::Update() {
+ GestureConfiguration::set_long_press_time_in_seconds(
+ prefs_->GetDouble(
+ prefs::kLongPressTimeInSeconds));
+ GestureConfiguration::set_max_seconds_between_double_click(
+ prefs_->GetDouble(
+ prefs::kMaxSecondsBetweenDoubleClick));
+ GestureConfiguration::set_max_separation_for_gesture_touches_in_pixels(
+ prefs_->GetDouble(
+ prefs::kMaxSeparationForGestureTouchesInPixels));
+ GestureConfiguration::set_max_touch_down_duration_in_seconds_for_click(
+ prefs_->GetDouble(
+ prefs::kMaxTouchDownDurationInSecondsForClick));
+ GestureConfiguration::set_max_touch_move_in_pixels_for_click(
+ prefs_->GetDouble(
+ prefs::kMaxTouchMoveInPixelsForClick));
+ GestureConfiguration::set_min_distance_for_pinch_scroll_in_pixels(
+ prefs_->GetDouble(
+ prefs::kMinDistanceForPinchScrollInPixels));
+ GestureConfiguration::set_min_flick_speed_squared(
+ prefs_->GetDouble(
+ prefs::kMinFlickSpeedSquared));
+ GestureConfiguration::set_min_pinch_update_distance_in_pixels(
+ prefs_->GetDouble(
+ prefs::kMinPinchUpdateDistanceInPixels));
+ GestureConfiguration::set_min_rail_break_velocity(
+ prefs_->GetDouble(
+ prefs::kMinRailBreakVelocity));
+ GestureConfiguration::set_min_scroll_delta_squared(
+ prefs_->GetDouble(
+ prefs::kMinScrollDeltaSquared));
+ GestureConfiguration::set_min_touch_down_duration_in_seconds_for_click(
+ prefs_->GetDouble(
+ prefs::kMinTouchDownDurationInSecondsForClick));
+ GestureConfiguration::set_points_buffered_for_velocity(
+ prefs_->GetInteger(
+ prefs::kPointsBufferedForVelocity));
+ GestureConfiguration::set_rail_break_proportion(
+ prefs_->GetDouble(
+ prefs::kRailBreakProportion));
+ GestureConfiguration::set_rail_start_proportion(
+ prefs_->GetDouble(
+ prefs::kRailStartProportion));
+}
+
+} // namespace
+
+// static
+GesturePrefsObserverFactoryAura*
+GesturePrefsObserverFactoryAura::GetInstance() {
+ return Singleton<GesturePrefsObserverFactoryAura>::get();
+}
+
+GesturePrefsObserverFactoryAura::GesturePrefsObserverFactoryAura()
+ : ProfileKeyedServiceFactory("GesturePrefsObserverAura",
+ ProfileDependencyManager::GetInstance()) {}
+
+GesturePrefsObserverFactoryAura::~GesturePrefsObserverFactoryAura() {}
+
+ProfileKeyedService* GesturePrefsObserverFactoryAura::BuildServiceInstanceFor(
+ Profile* profile) const {
+ return new GesturePrefsObserver(profile->GetPrefs());
+}
+
+void GesturePrefsObserverFactoryAura::RegisterUserPrefs(PrefService* prefs) {
+ prefs->RegisterDoublePref(
+ prefs::kLongPressTimeInSeconds,
+ GestureConfiguration::long_press_time_in_seconds(),
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDoublePref(
+ prefs::kMaxSecondsBetweenDoubleClick,
+ GestureConfiguration::max_seconds_between_double_click(),
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDoublePref(
+ prefs::kMaxSeparationForGestureTouchesInPixels,
+ GestureConfiguration::max_separation_for_gesture_touches_in_pixels(),
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDoublePref(
+ prefs::kMaxTouchDownDurationInSecondsForClick,
+ GestureConfiguration::max_touch_down_duration_in_seconds_for_click(),
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDoublePref(
+ prefs::kMaxTouchMoveInPixelsForClick,
+ GestureConfiguration::max_touch_move_in_pixels_for_click(),
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDoublePref(
+ prefs::kMinDistanceForPinchScrollInPixels,
+ GestureConfiguration::min_distance_for_pinch_scroll_in_pixels(),
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDoublePref(
+ prefs::kMinFlickSpeedSquared,
+ GestureConfiguration::min_flick_speed_squared(),
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDoublePref(
+ prefs::kMinPinchUpdateDistanceInPixels,
+ GestureConfiguration::min_pinch_update_distance_in_pixels(),
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDoublePref(
+ prefs::kMinRailBreakVelocity,
+ GestureConfiguration::min_rail_break_velocity(),
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDoublePref(
+ prefs::kMinScrollDeltaSquared,
+ GestureConfiguration::min_scroll_delta_squared(),
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDoublePref(
+ prefs::kMinTouchDownDurationInSecondsForClick,
+ GestureConfiguration::min_touch_down_duration_in_seconds_for_click(),
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterIntegerPref(
+ prefs::kPointsBufferedForVelocity,
+ GestureConfiguration::points_buffered_for_velocity(),
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDoublePref(
+ prefs::kRailBreakProportion,
+ GestureConfiguration::rail_break_proportion(),
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDoublePref(
+ prefs::kRailStartProportion,
+ GestureConfiguration::rail_start_proportion(),
+ PrefService::UNSYNCABLE_PREF);
+}
+
+bool GesturePrefsObserverFactoryAura::ServiceIsCreatedWithProfile() {
+ // Create the observer as soon as the profile is created.
+ return true;
+}
+
+bool GesturePrefsObserverFactoryAura::ServiceRedirectedInIncognito() {
+ // Use same gesture preferences on incognito windows.
+ return true;
+}
+
+bool GesturePrefsObserverFactoryAura::ServiceIsNULLWhileTesting() {
+ // Some tests replace the PrefService of the TestingProfile after the
+ // GesturePrefsObserver has been created, which makes Shutdown()
+ // remove the registrar from a non-existent PrefService.
+ return true;
+}
diff --git a/chrome/browser/ui/views/ash/gesture_prefs_observer_factory_aura.h b/chrome/browser/ui/views/ash/gesture_prefs_observer_factory_aura.h
new file mode 100644
index 0000000..1357d3a
--- /dev/null
+++ b/chrome/browser/ui/views/ash/gesture_prefs_observer_factory_aura.h
@@ -0,0 +1,38 @@
+// Copyright (c) 2012 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_UI_VIEWS_ASH_GESTURE_PREFS_OBSERVER_FACTORY_AURA_H_
+#define CHROME_BROWSER_UI_VIEWS_ASH_GESTURE_PREFS_OBSERVER_FACTORY_AURA_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/memory/singleton.h"
+#include "chrome/browser/profiles/profile_keyed_service_factory.h"
+
+class PrefService;
+class Profile;
+
+// Create an observer per Profile that listens for gesture preferences updates.
+class GesturePrefsObserverFactoryAura : public ProfileKeyedServiceFactory {
+ public:
+ static GesturePrefsObserverFactoryAura* GetInstance();
+
+ private:
+ friend struct DefaultSingletonTraits<GesturePrefsObserverFactoryAura>;
+
+ GesturePrefsObserverFactoryAura();
+ virtual ~GesturePrefsObserverFactoryAura();
+
+ // ProfileKeyedServiceFactory:
+ virtual ProfileKeyedService* BuildServiceInstanceFor(
+ Profile* profile) const OVERRIDE;
+ virtual void RegisterUserPrefs(PrefService* prefs) OVERRIDE;
+ virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(GesturePrefsObserverFactoryAura);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_ASH_GESTURE_PREFS_OBSERVER_FACTORY_AURA_H_
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 2d64498e..cfe1da4 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -2810,8 +2810,6 @@
'browser/ui/fullscreen_exit_bubble.h',
'browser/ui/fullscreen_exit_bubble_type.cc',
'browser/ui/fullscreen_exit_bubble_type.h',
- 'browser/ui/gesture_prefs.cc',
- 'browser/ui/gesture_prefs.h',
'browser/ui/global_error.cc',
'browser/ui/global_error.h',
'browser/ui/global_error_bubble_view_base.h',
@@ -3237,7 +3235,8 @@
'browser/ui/views/ash/caps_lock_handler.h',
'browser/ui/views/ash/chrome_shell_delegate.cc',
'browser/ui/views/ash/chrome_shell_delegate.h',
- 'browser/ui/views/ash/gesture_prefs_aura.cc',
+ 'browser/ui/views/ash/gesture_prefs_observer_factory_aura.cc',
+ 'browser/ui/views/ash/gesture_prefs_observer_factory_aura.h',
'browser/ui/views/ash/ime_controller_chromeos.cc',
'browser/ui/views/ash/ime_controller_chromeos.h',
'browser/ui/views/ash/key_rewriter.cc',
@@ -4261,7 +4260,6 @@
['exclude', '^browser/tab_contents/web_drag_bookmark_handler_win.cc'],
['exclude', '^browser/tab_contents/web_drag_bookmark_handler_win.h'],
['exclude', '^browser/ui/browser_list_stub.cc'],
- ['exclude', '^browser/ui/gesture_prefs.cc'],
['exclude', '^browser/ui/panels/display_settings_provider_win.cc'],
['exclude', '^browser/ui/tabs/dock_info_win.cc'],
['exclude', '^browser/ui/views/about_ipc_dialog.cc'],
@@ -4307,7 +4305,6 @@
['include', '^browser/chromeos/status/status_area_button.h'],
['include', '^browser/chromeos/status/status_area_view.cc'],
['include', '^browser/chromeos/status/status_area_view.h'],
- #['include', '^browser/ui/views/ash/gesture_prefs_aura.cc'],
['include', '^browser/ui/views/simple_message_box_views.cc'],
['include', '^browser/ui/views/simple_message_box_views.h'],
['include', '^browser/ui/webui/certificate_viewer_webui.cc'],
diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt
index 309174a..945b216 100644
--- a/tools/valgrind/memcheck/suppressions.txt
+++ b/tools/valgrind/memcheck/suppressions.txt
@@ -5296,13 +5296,6 @@
fun:_ZN7WebCore19CCSingleThreadProxy11doCompositeEv
}
{
- bug_117245
- Memcheck:Uninitialized
- fun:_ZN12_GLOBAL__N_124GesturePrefsObserverAura13RegisterPrefsEP11PrefService
- fun:_Z25GesturePrefsRegisterPrefsP11PrefService
- fun:_ZN7browser18RegisterLocalStateEP11PrefService
-}
-{
bug_117427
Memcheck:Leak
fun:_Znw*