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

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

Issue 10117019: Merge 132065 - Modify IsSyncable to only include Internal items and the Chrome Web Store (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src/
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/extensions/extension_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/common/extensions/extension.h" 5 #include "chrome/common/extensions/extension.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 3498 matching lines...) Expand 10 before | Expand all | Expand 10 after
3509 return SYNC_TYPE_APP; 3509 return SYNC_TYPE_APP;
3510 3510
3511 default: 3511 default:
3512 return SYNC_TYPE_NONE; 3512 return SYNC_TYPE_NONE;
3513 } 3513 }
3514 } 3514 }
3515 3515
3516 bool Extension::IsSyncable() const { 3516 bool Extension::IsSyncable() const {
3517 // TODO(akalin): Figure out if we need to allow some other types. 3517 // TODO(akalin): Figure out if we need to allow some other types.
3518 3518
3519 // We want to sync any extensions that are shown in the launcher because 3519 // We want to sync any extensions that are internal and the chrome web store.
3520 // their positions should sync.
3521 return location() == Extension::INTERNAL || 3520 return location() == Extension::INTERNAL ||
3522 ShouldDisplayInLauncher(); 3521 id() == extension_misc::kWebStoreAppId;
3523 } 3522 }
3524 3523
3525 bool Extension::ShouldDisplayInLauncher() const { 3524 bool Extension::ShouldDisplayInLauncher() const {
3526 // All apps should be displayed on the NTP except for the Cloud Print App. 3525 // All apps should be displayed on the NTP except for the Cloud Print App.
3527 return is_app() && id() != extension_misc::kCloudPrintAppId; 3526 return is_app() && id() != extension_misc::kCloudPrintAppId;
3528 } 3527 }
3529 3528
3530 ExtensionInfo::ExtensionInfo(const DictionaryValue* manifest, 3529 ExtensionInfo::ExtensionInfo(const DictionaryValue* manifest,
3531 const std::string& id, 3530 const std::string& id,
3532 const FilePath& path, 3531 const FilePath& path,
(...skipping 29 matching lines...) Expand all
3562 already_disabled(false), 3561 already_disabled(false),
3563 extension(extension) {} 3562 extension(extension) {}
3564 3563
3565 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 3564 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
3566 const Extension* extension, 3565 const Extension* extension,
3567 const ExtensionPermissionSet* permissions, 3566 const ExtensionPermissionSet* permissions,
3568 Reason reason) 3567 Reason reason)
3569 : reason(reason), 3568 : reason(reason),
3570 extension(extension), 3569 extension(extension),
3571 permissions(permissions) {} 3570 permissions(permissions) {}
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/extension_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698