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

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

Issue 925563002: Supervised users: Slightly relax restrictions around extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test_ext_install_disable
Patch Set: rebase Created 5 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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 bool IsNewBookmarkAppsEnabled() { 386 bool IsNewBookmarkAppsEnabled() {
387 #if defined(OS_CHROMEOS) 387 #if defined(OS_CHROMEOS)
388 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 388 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
389 switches::kDisableNewBookmarkApps); 389 switches::kDisableNewBookmarkApps);
390 #else 390 #else
391 return base::CommandLine::ForCurrentProcess()->HasSwitch( 391 return base::CommandLine::ForCurrentProcess()->HasSwitch(
392 switches::kEnableNewBookmarkApps); 392 switches::kEnableNewBookmarkApps);
393 #endif 393 #endif
394 } 394 }
395 395
396 bool IsExtensionSupervised(const Extension* extension, Profile* profile) {
397 return extension->was_installed_by_custodian() && profile->IsSupervised();
398 }
399
396 } // namespace util 400 } // namespace util
397 } // namespace extensions 401 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_util.h ('k') | chrome/browser/resources/extensions/extension_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698