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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 } | 292 } |
293 | 293 |
294 const gfx::ImageSkia& GetDefaultExtensionIcon() { | 294 const gfx::ImageSkia& GetDefaultExtensionIcon() { |
295 return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 295 return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
296 IDR_EXTENSION_DEFAULT_ICON); | 296 IDR_EXTENSION_DEFAULT_ICON); |
297 } | 297 } |
298 | 298 |
299 bool IsNewBookmarkAppsEnabled() { | 299 bool IsNewBookmarkAppsEnabled() { |
300 #if defined(OS_MACOSX) | 300 #if defined(OS_MACOSX) |
301 return base::FeatureList::IsEnabled(features::kBookmarkApps) || | 301 return base::FeatureList::IsEnabled(features::kBookmarkApps) || |
302 base::FeatureList::IsEnabled(features::kAppBanners); | 302 base::FeatureList::IsEnabled(features::kAppBanners) || |
| 303 base::FeatureList::IsEnabled(features::kExperimentalAppBanners); |
303 #else | 304 #else |
304 return true; | 305 return true; |
305 #endif | 306 #endif |
306 } | 307 } |
307 | 308 |
308 bool CanHostedAppsOpenInWindows() { | 309 bool CanHostedAppsOpenInWindows() { |
309 #if defined(OS_MACOSX) | 310 #if defined(OS_MACOSX) |
310 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 311 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
311 switches::kEnableHostedAppsInWindows); | 312 switches::kEnableHostedAppsInWindows); |
312 #else | 313 #else |
313 return true; | 314 return true; |
314 #endif | 315 #endif |
315 } | 316 } |
316 | 317 |
317 bool IsExtensionSupervised(const Extension* extension, Profile* profile) { | 318 bool IsExtensionSupervised(const Extension* extension, Profile* profile) { |
318 return WasInstalledByCustodian(extension->id(), profile) && | 319 return WasInstalledByCustodian(extension->id(), profile) && |
319 profile->IsSupervised(); | 320 profile->IsSupervised(); |
320 } | 321 } |
321 | 322 |
322 } // namespace util | 323 } // namespace util |
323 } // namespace extensions | 324 } // namespace extensions |
OLD | NEW |