| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_process_manager_delegate.h" | 5 #include "chrome/browser/extensions/chrome_process_manager_delegate.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 const Extension& extension) const { | 63 const Extension& extension) const { |
| 64 #if defined(OS_CHROMEOS) | 64 #if defined(OS_CHROMEOS) |
| 65 Profile* profile = Profile::FromBrowserContext(context); | 65 Profile* profile = Profile::FromBrowserContext(context); |
| 66 | 66 |
| 67 const bool is_signin_profile = | 67 const bool is_signin_profile = |
| 68 chromeos::ProfileHelper::IsSigninProfile(profile) && | 68 chromeos::ProfileHelper::IsSigninProfile(profile) && |
| 69 !profile->IsOffTheRecord(); | 69 !profile->IsOffTheRecord(); |
| 70 | 70 |
| 71 if (is_signin_profile) { | 71 if (is_signin_profile) { |
| 72 // Check for flag. | 72 // Check for flag. |
| 73 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 73 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 74 switches::kEnableLoginScreenApps)) { | 74 switches::kDisableLoginScreenApps)) { |
| 75 return false; | 75 return false; |
| 76 } | 76 } |
| 77 | 77 |
| 78 // Get login screen apps installed by policy. | 78 // Get login screen apps installed by policy. |
| 79 std::unique_ptr<base::DictionaryValue> login_screen_apps_list = | 79 std::unique_ptr<base::DictionaryValue> login_screen_apps_list = |
| 80 ExtensionManagementFactory::GetForBrowserContext(context) | 80 ExtensionManagementFactory::GetForBrowserContext(context) |
| 81 ->GetForceInstallList(); | 81 ->GetForceInstallList(); |
| 82 | 82 |
| 83 // For the ChromeOS login profile, only allow apps installed by device | 83 // For the ChromeOS login profile, only allow apps installed by device |
| 84 // policy. | 84 // policy. |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 ProcessManager* incognito_manager = | 197 ProcessManager* incognito_manager = |
| 198 ProcessManagerFactory::GetForBrowserContextIfExists( | 198 ProcessManagerFactory::GetForBrowserContextIfExists( |
| 199 profile->GetOffTheRecordProfile()); | 199 profile->GetOffTheRecordProfile()); |
| 200 if (incognito_manager) { | 200 if (incognito_manager) { |
| 201 incognito_manager->CloseBackgroundHosts(); | 201 incognito_manager->CloseBackgroundHosts(); |
| 202 } | 202 } |
| 203 } | 203 } |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace extensions | 206 } // namespace extensions |
| OLD | NEW |