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

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

Issue 2645863004: Simplify managing visibility of extensions in settings. (Closed)
Patch Set: Fixed logic so tests pass. Created 3 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_ui_util.h" 5 #include "chrome/browser/extensions/extension_ui_util.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/common/extensions/extension_constants.h" 8 #include "chrome/common/extensions/extension_constants.h"
9 #include "chrome/common/pref_names.h" 9 #include "chrome/common/pref_names.h"
10 #include "components/prefs/pref_service.h" 10 #include "components/prefs/pref_service.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 content::BrowserContext* context) { 44 content::BrowserContext* context) {
45 return extension->ShouldDisplayInNewTabPage() && 45 return extension->ShouldDisplayInNewTabPage() &&
46 !IsBlockedByPolicy(extension, context); 46 !IsBlockedByPolicy(extension, context);
47 } 47 }
48 48
49 bool ShouldDisplayInExtensionSettings(const Extension* extension, 49 bool ShouldDisplayInExtensionSettings(const Extension* extension,
50 content::BrowserContext* context) { 50 content::BrowserContext* context) {
51 return extension->ShouldDisplayInExtensionSettings(); 51 return extension->ShouldDisplayInExtensionSettings();
52 } 52 }
53 53
54 bool ShouldNotBeVisible(const Extension* extension,
55 content::BrowserContext* context) {
56 return extension->ShouldNotBeVisible();
57 }
58
59 } // namespace ui_util 54 } // namespace ui_util
60 } // namespace extensions 55 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698