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

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

Issue 2765083002: Hardcode extensions::util::IsNewBookmarkAppsEnabled() to true, except on Mac. (Closed)
Patch Set: remove logging Created 3 years, 9 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/logging.h" 10 #include "base/logging.h"
11 #include "base/metrics/field_trial.h" 11 #include "base/metrics/field_trial.h"
12 #include "base/values.h" 12 #include "base/values.h"
dominickn 2017/03/22 04:18:12 #include "base/feature_list.h"
tapted 2017/03/23 02:59:58 Done.
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "chrome/browser/extensions/extension_service.h" 14 #include "chrome/browser/extensions/extension_service.h"
15 #include "chrome/browser/extensions/extension_sync_service.h" 15 #include "chrome/browser/extensions/extension_sync_service.h"
16 #include "chrome/browser/extensions/permissions_updater.h" 16 #include "chrome/browser/extensions/permissions_updater.h"
17 #include "chrome/browser/extensions/scripting_permissions_modifier.h" 17 #include "chrome/browser/extensions/scripting_permissions_modifier.h"
18 #include "chrome/browser/extensions/shared_module_service.h" 18 #include "chrome/browser/extensions/shared_module_service.h"
19 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" 20 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
21 #include "chrome/common/chrome_features.h"
21 #include "chrome/common/chrome_switches.h" 22 #include "chrome/common/chrome_switches.h"
22 #include "chrome/common/extensions/sync_helper.h" 23 #include "chrome/common/extensions/sync_helper.h"
23 #include "components/variations/variations_associated_data.h" 24 #include "components/variations/variations_associated_data.h"
24 #include "content/public/browser/site_instance.h" 25 #include "content/public/browser/site_instance.h"
25 #include "extensions/browser/extension_prefs.h" 26 #include "extensions/browser/extension_prefs.h"
26 #include "extensions/browser/extension_registry.h" 27 #include "extensions/browser/extension_registry.h"
27 #include "extensions/browser/extension_system.h" 28 #include "extensions/browser/extension_system.h"
28 #include "extensions/browser/extension_util.h" 29 #include "extensions/browser/extension_util.h"
29 #include "extensions/common/extension.h" 30 #include "extensions/common/extension.h"
30 #include "extensions/common/extension_icon_set.h" 31 #include "extensions/common/extension_icon_set.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 IDR_APP_DEFAULT_ICON); 324 IDR_APP_DEFAULT_ICON);
324 } 325 }
325 326
326 const gfx::ImageSkia& GetDefaultExtensionIcon() { 327 const gfx::ImageSkia& GetDefaultExtensionIcon() {
327 return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( 328 return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
328 IDR_EXTENSION_DEFAULT_ICON); 329 IDR_EXTENSION_DEFAULT_ICON);
329 } 330 }
330 331
331 bool IsNewBookmarkAppsEnabled() { 332 bool IsNewBookmarkAppsEnabled() {
332 #if defined(OS_MACOSX) 333 #if defined(OS_MACOSX)
333 return base::CommandLine::ForCurrentProcess()->HasSwitch( 334 return base::FeatureList::IsEnabled(features::kBookmarkApps);
334 switches::kEnableNewBookmarkApps);
335 #else 335 #else
336 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 336 return true;
337 switches::kDisableNewBookmarkApps);
338 #endif 337 #endif
339 } 338 }
340 339
341 bool CanHostedAppsOpenInWindows() { 340 bool CanHostedAppsOpenInWindows() {
342 #if defined(OS_MACOSX) 341 #if defined(OS_MACOSX)
343 return base::CommandLine::ForCurrentProcess()->HasSwitch( 342 return base::CommandLine::ForCurrentProcess()->HasSwitch(
344 switches::kEnableHostedAppsInWindows); 343 switches::kEnableHostedAppsInWindows);
345 #else 344 #else
346 return true; 345 return true;
347 #endif 346 #endif
348 } 347 }
349 348
350 bool IsExtensionSupervised(const Extension* extension, Profile* profile) { 349 bool IsExtensionSupervised(const Extension* extension, Profile* profile) {
351 return WasInstalledByCustodian(extension->id(), profile) && 350 return WasInstalledByCustodian(extension->id(), profile) &&
352 profile->IsSupervised(); 351 profile->IsSupervised();
353 } 352 }
354 353
355 } // namespace util 354 } // namespace util
356 } // namespace extensions 355 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698