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

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

Issue 1300763002: Add a flag to enable open in window for hosted apps on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@disable-new-bookmark-apps
Patch Set: Addressing nits Created 5 years, 4 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
« no previous file with comments | « chrome/browser/extensions/extension_util.h ('k') | chrome/browser/extensions/launch_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 bool IsNewBookmarkAppsEnabled() { 359 bool IsNewBookmarkAppsEnabled() {
360 #if defined(OS_MACOSX) 360 #if defined(OS_MACOSX)
361 return base::CommandLine::ForCurrentProcess()->HasSwitch( 361 return base::CommandLine::ForCurrentProcess()->HasSwitch(
362 switches::kEnableNewBookmarkApps); 362 switches::kEnableNewBookmarkApps);
363 #else 363 #else
364 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 364 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
365 switches::kDisableNewBookmarkApps); 365 switches::kDisableNewBookmarkApps);
366 #endif 366 #endif
367 } 367 }
368 368
369 bool CanHostedAppsOpenInWindows() {
370 #if defined(OS_MACOSX)
371 return base::CommandLine::ForCurrentProcess()->HasSwitch(
372 switches::kEnableHostedAppsInWindows);
373 #else
374 return true;
375 #endif
376 }
377
369 bool IsExtensionSupervised(const Extension* extension, Profile* profile) { 378 bool IsExtensionSupervised(const Extension* extension, Profile* profile) {
370 return extension->was_installed_by_custodian() && profile->IsSupervised(); 379 return extension->was_installed_by_custodian() && profile->IsSupervised();
371 } 380 }
372 381
373 bool NeedCustodianApprovalForPermissionIncrease() { 382 bool NeedCustodianApprovalForPermissionIncrease() {
374 const std::string group_name = base::FieldTrialList::FindFullName( 383 const std::string group_name = base::FieldTrialList::FindFullName(
375 kSupervisedUserExtensionPermissionIncreaseFieldTrialName); 384 kSupervisedUserExtensionPermissionIncreaseFieldTrialName);
376 return group_name == "NeedCustodianApproval"; 385 return group_name == "NeedCustodianApproval";
377 } 386 }
378 387
379 } // namespace util 388 } // namespace util
380 } // namespace extensions 389 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_util.h ('k') | chrome/browser/extensions/launch_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698