| 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/extension_util.h" | 5 #include "chrome/browser/extensions/extension_util.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 "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 bool IsNewBookmarkAppsEnabled() { | 359 bool IsNewBookmarkAppsEnabled() { |
| 360 #if defined(OS_MACOSX) | 360 #if defined(OS_MACOSX) |
| 361 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 361 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 362 switches::kEnableNewBookmarkApps); | 362 switches::kEnableNewBookmarkApps); |
| 363 #else | 363 #else |
| 364 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 364 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 365 switches::kDisableNewBookmarkApps); | 365 switches::kDisableNewBookmarkApps); |
| 366 #endif | 366 #endif |
| 367 } | 367 } |
| 368 | 368 |
| 369 bool CanHostedAppsOpenInWindows() { |
| 370 #if defined(OS_MACOSX) |
| 371 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 372 switches::kEnableHostedAppsInWindows); |
| 373 #else |
| 374 return true; |
| 375 #endif |
| 376 } |
| 377 |
| 369 bool IsExtensionSupervised(const Extension* extension, Profile* profile) { | 378 bool IsExtensionSupervised(const Extension* extension, Profile* profile) { |
| 370 return extension->was_installed_by_custodian() && profile->IsSupervised(); | 379 return extension->was_installed_by_custodian() && profile->IsSupervised(); |
| 371 } | 380 } |
| 372 | 381 |
| 373 bool NeedCustodianApprovalForPermissionIncrease() { | 382 bool NeedCustodianApprovalForPermissionIncrease() { |
| 374 const std::string group_name = base::FieldTrialList::FindFullName( | 383 const std::string group_name = base::FieldTrialList::FindFullName( |
| 375 kSupervisedUserExtensionPermissionIncreaseFieldTrialName); | 384 kSupervisedUserExtensionPermissionIncreaseFieldTrialName); |
| 376 return group_name == "NeedCustodianApproval"; | 385 return group_name == "NeedCustodianApproval"; |
| 377 } | 386 } |
| 378 | 387 |
| 379 } // namespace util | 388 } // namespace util |
| 380 } // namespace extensions | 389 } // namespace extensions |
| OLD | NEW |