| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" | 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 // Tests should be able to tune login manager before showing it. | 450 // Tests should be able to tune login manager before showing it. |
| 451 // Thus only show login manager in normal (non-testing) mode. | 451 // Thus only show login manager in normal (non-testing) mode. |
| 452 if (!parameters().ui_task) | 452 if (!parameters().ui_task) |
| 453 OptionallyRunChromeOSLoginManager(parsed_command_line(), profile()); | 453 OptionallyRunChromeOSLoginManager(parsed_command_line(), profile()); |
| 454 | 454 |
| 455 // These observers must be initialized after the profile because | 455 // These observers must be initialized after the profile because |
| 456 // they use the profile to dispatch extension events. | 456 // they use the profile to dispatch extension events. |
| 457 // | 457 // |
| 458 // Initialize the brightness observer so that we'll display an onscreen | 458 // Initialize the brightness observer so that we'll display an onscreen |
| 459 // indication of brightness changes during login. | 459 // indication of brightness changes during login. |
| 460 brightness_observer_.reset(new chromeos::BrightnessObserver()); | 460 brightness_observer_.reset(new chromeos::BrightnessObserver(profile())); |
| 461 output_observer_.reset(new chromeos::OutputObserver()); | 461 output_observer_.reset(new chromeos::OutputObserver()); |
| 462 resume_observer_.reset(new chromeos::ResumeObserver()); | 462 resume_observer_.reset(new chromeos::ResumeObserver(profile())); |
| 463 screen_lock_observer_.reset(new chromeos::ScreenLockObserver()); | 463 screen_lock_observer_.reset(new chromeos::ScreenLockObserver(profile())); |
| 464 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) | 464 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) |
| 465 power_state_override_.reset(new chromeos::PowerStateOverride()); | 465 power_state_override_.reset(new chromeos::PowerStateOverride()); |
| 466 | 466 |
| 467 media_device_notifications_ = new chromeos::MediaDeviceNotifications(); | 467 media_device_notifications_ = new chromeos::MediaDeviceNotifications(); |
| 468 | 468 |
| 469 ChromeBrowserMainPartsLinux::PostProfileInit(); | 469 ChromeBrowserMainPartsLinux::PostProfileInit(); |
| 470 } | 470 } |
| 471 | 471 |
| 472 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { | 472 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { |
| 473 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 473 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 LOG(WARNING) << "low_mem: Part of '100MB' experiment"; | 610 LOG(WARNING) << "low_mem: Part of '100MB' experiment"; |
| 611 chromeos::LowMemoryObserver::SetLowMemoryMargin(100); | 611 chromeos::LowMemoryObserver::SetLowMemoryMargin(100); |
| 612 } else if (trial->group() == margin_200mb) { | 612 } else if (trial->group() == margin_200mb) { |
| 613 LOG(WARNING) << "low_mem: Part of '200MB' experiment"; | 613 LOG(WARNING) << "low_mem: Part of '200MB' experiment"; |
| 614 chromeos::LowMemoryObserver::SetLowMemoryMargin(200); | 614 chromeos::LowMemoryObserver::SetLowMemoryMargin(200); |
| 615 } else { | 615 } else { |
| 616 LOG(WARNING) << "low_mem: Part of 'default' experiment"; | 616 LOG(WARNING) << "low_mem: Part of 'default' experiment"; |
| 617 } | 617 } |
| 618 } | 618 } |
| 619 } | 619 } |
| OLD | NEW |