Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: chrome/browser/extensions/extension_util.cc

Issue 2944283002: Replace --add-to-shelf flag with kAppBanners feature. (Closed)
Patch Set: Self nit Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698