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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 350 return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
351 IDR_APP_DEFAULT_ICON); | 351 IDR_APP_DEFAULT_ICON); |
352 } | 352 } |
353 | 353 |
354 const gfx::ImageSkia& GetDefaultExtensionIcon() { | 354 const gfx::ImageSkia& GetDefaultExtensionIcon() { |
355 return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 355 return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
356 IDR_EXTENSION_DEFAULT_ICON); | 356 IDR_EXTENSION_DEFAULT_ICON); |
357 } | 357 } |
358 | 358 |
359 bool IsNewBookmarkAppsEnabled() { | 359 bool IsNewBookmarkAppsEnabled() { |
| 360 #if defined(OS_MACOSX) |
| 361 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 362 switches::kEnableNewBookmarkApps); |
| 363 #else |
360 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 364 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
361 switches::kDisableNewBookmarkApps); | 365 switches::kDisableNewBookmarkApps); |
| 366 #endif |
362 } | 367 } |
363 | 368 |
364 bool IsExtensionSupervised(const Extension* extension, Profile* profile) { | 369 bool IsExtensionSupervised(const Extension* extension, Profile* profile) { |
365 return extension->was_installed_by_custodian() && profile->IsSupervised(); | 370 return extension->was_installed_by_custodian() && profile->IsSupervised(); |
366 } | 371 } |
367 | 372 |
368 bool NeedCustodianApprovalForPermissionIncrease() { | 373 bool NeedCustodianApprovalForPermissionIncrease() { |
369 const std::string group_name = base::FieldTrialList::FindFullName( | 374 const std::string group_name = base::FieldTrialList::FindFullName( |
370 kSupervisedUserExtensionPermissionIncreaseFieldTrialName); | 375 kSupervisedUserExtensionPermissionIncreaseFieldTrialName); |
371 return group_name == "NeedCustodianApproval"; | 376 return group_name == "NeedCustodianApproval"; |
372 } | 377 } |
373 | 378 |
374 } // namespace util | 379 } // namespace util |
375 } // namespace extensions | 380 } // namespace extensions |
OLD | NEW |