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

Side by Side Diff: extensions/common/extension.cc

Issue 282103003: Moved IS_EPHEMERAL flag to extension prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix up file header Created 6 years, 7 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 | « extensions/common/extension.h ('k') | extensions/extensions.gyp » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "extensions/common/extension.h" 5 #include "extensions/common/extension.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 324
325 return web_extent().OverlapsWith(origin_only_pattern_list); 325 return web_extent().OverlapsWith(origin_only_pattern_list);
326 } 326 }
327 327
328 bool Extension::RequiresSortOrdinal() const { 328 bool Extension::RequiresSortOrdinal() const {
329 return is_app() && (display_in_launcher_ || display_in_new_tab_page_); 329 return is_app() && (display_in_launcher_ || display_in_new_tab_page_);
330 } 330 }
331 331
332 bool Extension::ShouldDisplayInAppLauncher() const { 332 bool Extension::ShouldDisplayInAppLauncher() const {
333 // Only apps should be displayed in the launcher. 333 // Only apps should be displayed in the launcher.
334 return is_app() && display_in_launcher_ && !is_ephemeral(); 334 return is_app() && display_in_launcher_;
335 } 335 }
336 336
337 bool Extension::ShouldDisplayInNewTabPage() const { 337 bool Extension::ShouldDisplayInNewTabPage() const {
338 // Only apps should be displayed on the NTP. 338 // Only apps should be displayed on the NTP.
339 return is_app() && display_in_new_tab_page_ && !is_ephemeral(); 339 return is_app() && display_in_new_tab_page_;
340 } 340 }
341 341
342 bool Extension::ShouldDisplayInExtensionSettings() const { 342 bool Extension::ShouldDisplayInExtensionSettings() const {
343 // Don't show for themes since the settings UI isn't really useful for them. 343 // Don't show for themes since the settings UI isn't really useful for them.
344 if (is_theme()) 344 if (is_theme())
345 return false; 345 return false;
346 346
347 // Don't show component extensions and invisible apps. 347 // Don't show component extensions and invisible apps.
348 if (ShouldNotBeVisible()) 348 if (ShouldNotBeVisible())
349 return false; 349 return false;
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 781
782 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 782 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
783 const Extension* extension, 783 const Extension* extension,
784 const PermissionSet* permissions, 784 const PermissionSet* permissions,
785 Reason reason) 785 Reason reason)
786 : reason(reason), 786 : reason(reason),
787 extension(extension), 787 extension(extension),
788 permissions(permissions) {} 788 permissions(permissions) {}
789 789
790 } // namespace extensions 790 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/extension.h ('k') | extensions/extensions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698