Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2637)

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 8380011: chromeos: Silence log spam from x11_util.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 46c9926416695b1ab9e563177179c345de2d0c0e..e55c993fdc9f203285f1c28fe677f0b93ba17c79 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -143,6 +143,7 @@
#include "chrome/browser/chromeos/login/ownership_service.h"
#include "chrome/browser/chromeos/login/screen_locker.h"
#include "chrome/browser/chromeos/login/user_manager.h"
+#include "chrome/browser/chromeos/system/runtime_environment.h"
#include "chrome/browser/chromeos/system_key_event_listener.h"
#include "chrome/browser/chromeos/user_cros_settings_provider.h"
#include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h"
@@ -1817,8 +1818,12 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunInternal() {
chromeos::AudioHandler::Initialize();
// Listen for system key events so that the user will be able to adjust the
- // volume on the login screen.
- chromeos::SystemKeyEventListener::Initialize();
+ // volume on the login screen, if Chrome is running on Chrome OS
+ // (i.e. not Linux desktop), and in non-test mode.
+ if (chromeos::system::runtime_environment::IsRunningOnChromeOS() &&
+ !parameters().ui_task) { // ui_task is non-NULL when running tests.
+ chromeos::SystemKeyEventListener::Initialize();
+ }
// Listen for XI_HierarchyChanged events.
chromeos::XInputHierarchyChangedEventListener::GetInstance();
@@ -2039,7 +2044,11 @@ void ChromeBrowserMainParts::PostMainMessageLoopRun() {
// Singletons are finally destroyed in AtExitManager.
chromeos::XInputHierarchyChangedEventListener::GetInstance()->Stop();
- chromeos::SystemKeyEventListener::Shutdown();
+ // See comment at call to chromeos::SystemKeyEventListener::Initialize().
+ if (chromeos::system::runtime_environment::IsRunningOnChromeOS() &&
+ !parameters().ui_task) {
stevenjb 2011/10/24 20:17:36 nit: SystemKeyEventListener::Shutdown() is always
satorux1 2011/10/24 20:27:28 Agreed. Removed the conditional and added some com
+ chromeos::SystemKeyEventListener::Shutdown();
+ }
chromeos::AudioHandler::Shutdown();
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698