| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/extensions/chrome_extensions_browser_client.h" | 5 #include "chrome/browser/extensions/chrome_extensions_browser_client.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 #include "extensions/browser/mojo/service_registration.h" | 57 #include "extensions/browser/mojo/service_registration.h" |
| 58 #include "extensions/browser/pref_names.h" | 58 #include "extensions/browser/pref_names.h" |
| 59 #include "extensions/browser/url_request_util.h" | 59 #include "extensions/browser/url_request_util.h" |
| 60 #include "extensions/common/features/feature_channel.h" | 60 #include "extensions/common/features/feature_channel.h" |
| 61 | 61 |
| 62 #if defined(OS_CHROMEOS) | 62 #if defined(OS_CHROMEOS) |
| 63 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 63 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 64 #include "chrome/browser/extensions/updater/chromeos_extension_cache_delegate.h" | 64 #include "chrome/browser/extensions/updater/chromeos_extension_cache_delegate.h" |
| 65 #include "chrome/browser/extensions/updater/extension_cache_impl.h" | 65 #include "chrome/browser/extensions/updater/extension_cache_impl.h" |
| 66 #include "chromeos/chromeos_switches.h" | 66 #include "chromeos/chromeos_switches.h" |
| 67 #include "components/session_manager/core/session_manager.h" | |
| 68 #include "components/user_manager/user_manager.h" | 67 #include "components/user_manager/user_manager.h" |
| 69 #else | 68 #else |
| 70 #include "extensions/browser/updater/null_extension_cache.h" | 69 #include "extensions/browser/updater/null_extension_cache.h" |
| 71 #endif | 70 #endif |
| 72 | 71 |
| 73 namespace extensions { | 72 namespace extensions { |
| 74 | 73 |
| 75 namespace { | 74 namespace { |
| 76 | 75 |
| 77 // If true, the extensions client will behave as though there is always a | 76 // If true, the extensions client will behave as though there is always a |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 | 446 |
| 448 KioskDelegate* ChromeExtensionsBrowserClient::GetKioskDelegate() { | 447 KioskDelegate* ChromeExtensionsBrowserClient::GetKioskDelegate() { |
| 449 if (!kiosk_delegate_) | 448 if (!kiosk_delegate_) |
| 450 kiosk_delegate_.reset(new ChromeKioskDelegate()); | 449 kiosk_delegate_.reset(new ChromeKioskDelegate()); |
| 451 return kiosk_delegate_.get(); | 450 return kiosk_delegate_.get(); |
| 452 } | 451 } |
| 453 | 452 |
| 454 bool ChromeExtensionsBrowserClient::IsLockScreenContext( | 453 bool ChromeExtensionsBrowserClient::IsLockScreenContext( |
| 455 content::BrowserContext* context) { | 454 content::BrowserContext* context) { |
| 456 #if defined(OS_CHROMEOS) | 455 #if defined(OS_CHROMEOS) |
| 457 return chromeos::ProfileHelper::IsSigninProfile( | 456 return chromeos::ProfileHelper::IsLockScreenAppProfile( |
| 458 Profile::FromBrowserContext(context)) && | 457 Profile::FromBrowserContext(context)); |
| 459 session_manager::SessionManager::Get()->IsSessionStarted(); | |
| 460 #else | 458 #else |
| 461 return false; | 459 return false; |
| 462 #endif | 460 #endif |
| 463 } | 461 } |
| 464 | 462 |
| 465 // static | 463 // static |
| 466 void ChromeExtensionsBrowserClient::set_did_chrome_update_for_testing( | 464 void ChromeExtensionsBrowserClient::set_did_chrome_update_for_testing( |
| 467 bool did_update) { | 465 bool did_update) { |
| 468 g_did_chrome_update_for_testing = did_update; | 466 g_did_chrome_update_for_testing = did_update; |
| 469 } | 467 } |
| 470 | 468 |
| 471 } // namespace extensions | 469 } // namespace extensions |
| OLD | NEW |