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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 IDR_APP_DEFAULT_ICON); | 291 IDR_APP_DEFAULT_ICON); |
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 #else | 303 #else |
303 return true; | 304 return true; |
304 #endif | 305 #endif |
305 } | 306 } |
306 | 307 |
307 bool CanHostedAppsOpenInWindows() { | 308 bool CanHostedAppsOpenInWindows() { |
308 #if defined(OS_MACOSX) | 309 #if defined(OS_MACOSX) |
309 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 310 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
310 switches::kEnableHostedAppsInWindows); | 311 switches::kEnableHostedAppsInWindows); |
311 #else | 312 #else |
312 return true; | 313 return true; |
313 #endif | 314 #endif |
314 } | 315 } |
315 | 316 |
316 bool IsExtensionSupervised(const Extension* extension, Profile* profile) { | 317 bool IsExtensionSupervised(const Extension* extension, Profile* profile) { |
317 return WasInstalledByCustodian(extension->id(), profile) && | 318 return WasInstalledByCustodian(extension->id(), profile) && |
318 profile->IsSupervised(); | 319 profile->IsSupervised(); |
319 } | 320 } |
320 | 321 |
321 } // namespace util | 322 } // namespace util |
322 } // namespace extensions | 323 } // namespace extensions |
OLD | NEW |