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

Side by Side Diff: chrome/browser/chromeos/login/login_display_host_impl.cc

Issue 176363002: Rename Start/EndKeepAlive to Increment/DecrementKeepAliveCount (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (rename_keep_alive) Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/login/login_display_host_impl.h" 5 #include "chrome/browser/chromeos/login/login_display_host_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/audio/sounds.h" 9 #include "ash/audio/sounds.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 // Login screen is moved to lock screen container when user logs in. 290 // Login screen is moved to lock screen container when user logs in.
291 registrar_.Add(this, 291 registrar_.Add(this,
292 chrome::NOTIFICATION_LOGIN_USER_CHANGED, 292 chrome::NOTIFICATION_LOGIN_USER_CHANGED,
293 content::NotificationService::AllSources()); 293 content::NotificationService::AllSources());
294 294
295 DCHECK(default_host_ == NULL); 295 DCHECK(default_host_ == NULL);
296 default_host_ = this; 296 default_host_ = this;
297 297
298 // Make sure chrome won't exit while we are at login/oobe screen. 298 // Make sure chrome won't exit while we are at login/oobe screen.
299 chrome::StartKeepAlive(); 299 chrome::IncrementKeepAliveCount();
300 300
301 bool is_registered = StartupUtils::IsDeviceRegistered(); 301 bool is_registered = StartupUtils::IsDeviceRegistered();
302 bool zero_delay_enabled = WizardController::IsZeroDelayEnabled(); 302 bool zero_delay_enabled = WizardController::IsZeroDelayEnabled();
303 bool disable_boot_animation = CommandLine::ForCurrentProcess()->HasSwitch( 303 bool disable_boot_animation = CommandLine::ForCurrentProcess()->HasSwitch(
304 switches::kDisableBootAnimation); 304 switches::kDisableBootAnimation);
305 bool disable_oobe_animation = CommandLine::ForCurrentProcess()->HasSwitch( 305 bool disable_oobe_animation = CommandLine::ForCurrentProcess()->HasSwitch(
306 switches::kDisableOobeAnimation); 306 switches::kDisableOobeAnimation);
307 307
308 waiting_for_wallpaper_load_ = !zero_delay_enabled && 308 waiting_for_wallpaper_load_ = !zero_delay_enabled &&
309 (is_registered || !disable_oobe_animation) && 309 (is_registered || !disable_oobe_animation) &&
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 367 }
368 368
369 LoginDisplayHostImpl::~LoginDisplayHostImpl() { 369 LoginDisplayHostImpl::~LoginDisplayHostImpl() {
370 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this); 370 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this);
371 CrasAudioHandler::Get()->RemoveAudioObserver(this); 371 CrasAudioHandler::Get()->RemoveAudioObserver(this);
372 372
373 views::FocusManager::set_arrow_key_traversal_enabled(false); 373 views::FocusManager::set_arrow_key_traversal_enabled(false);
374 ResetLoginWindowAndView(); 374 ResetLoginWindowAndView();
375 375
376 // Let chrome process exit after login/oobe screen if needed. 376 // Let chrome process exit after login/oobe screen if needed.
377 chrome::EndKeepAlive(); 377 chrome::DecrementKeepAliveCount();
378 378
379 default_host_ = NULL; 379 default_host_ = NULL;
380 // TODO(tengs): This should be refactored. See crbug.com/314934. 380 // TODO(tengs): This should be refactored. See crbug.com/314934.
381 if (UserManager::Get()->IsCurrentUserNew()) { 381 if (UserManager::Get()->IsCurrentUserNew()) {
382 // DriveOptInController will delete itself when finished. 382 // DriveOptInController will delete itself when finished.
383 (new DriveFirstRunController( 383 (new DriveFirstRunController(
384 ProfileManager::GetActiveUserProfile()))->EnableOfflineMode(); 384 ProfileManager::GetActiveUserProfile()))->EnableOfflineMode();
385 } 385 }
386 } 386 }
387 387
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 scoped_ptr<locale_util::SwitchLanguageCallback> callback( 1213 scoped_ptr<locale_util::SwitchLanguageCallback> callback(
1214 new locale_util::SwitchLanguageCallback( 1214 new locale_util::SwitchLanguageCallback(
1215 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); 1215 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))));
1216 1216
1217 // Load locale keyboards here. Hardware layout would be automatically enabled. 1217 // Load locale keyboards here. Hardware layout would be automatically enabled.
1218 locale_util::SwitchLanguage( 1218 locale_util::SwitchLanguage(
1219 locale, true, true /* login_layouts_only */, callback.Pass()); 1219 locale, true, true /* login_layouts_only */, callback.Pass());
1220 } 1220 }
1221 1221
1222 } // namespace chromeos 1222 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698