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

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

Issue 10855190: Disable sync for default apps (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: comments Created 8 years, 3 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
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 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <iosfwd> 9 #include <iosfwd>
10 #include <map> 10 #include <map>
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 FROM_BOOKMARK = 1 << 4, 240 FROM_BOOKMARK = 1 << 4,
241 241
242 // |FOLLOW_SYMLINKS_ANYWHERE| means that resources can be symlinks to 242 // |FOLLOW_SYMLINKS_ANYWHERE| means that resources can be symlinks to
243 // anywhere in the filesystem, rather than being restricted to the 243 // anywhere in the filesystem, rather than being restricted to the
244 // extension directory. 244 // extension directory.
245 FOLLOW_SYMLINKS_ANYWHERE = 1 << 5, 245 FOLLOW_SYMLINKS_ANYWHERE = 1 << 5,
246 246
247 // |ERROR_ON_PRIVATE_KEY| means that private keys inside an 247 // |ERROR_ON_PRIVATE_KEY| means that private keys inside an
248 // extension should be errors rather than warnings. 248 // extension should be errors rather than warnings.
249 ERROR_ON_PRIVATE_KEY = 1 << 6, 249 ERROR_ON_PRIVATE_KEY = 1 << 6,
250
251 // |WAS_INSTALLED_BY_DEFAULT| installed by default when the profile was
252 // created.
253 WAS_INSTALLED_BY_DEFAULT = 1 << 7,
250 }; 254 };
251 255
252 static scoped_refptr<Extension> Create(const FilePath& path, 256 static scoped_refptr<Extension> Create(const FilePath& path,
253 Location location, 257 Location location,
254 const base::DictionaryValue& value, 258 const base::DictionaryValue& value,
255 int flags, 259 int flags,
256 std::string* error); 260 std::string* error);
257 261
258 // In a few special circumstances, we want to create an Extension and give it 262 // In a few special circumstances, we want to create an Extension and give it
259 // an explicit id. Most consumers should just use the other Create() method. 263 // an explicit id. Most consumers should just use the other Create() method.
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 const OAuth2Info& oauth2_info() const { return oauth2_info_; } 692 const OAuth2Info& oauth2_info() const { return oauth2_info_; }
689 const std::vector<webkit_glue::WebIntentServiceData>& 693 const std::vector<webkit_glue::WebIntentServiceData>&
690 intents_services() const { 694 intents_services() const {
691 return intents_services_; 695 return intents_services_;
692 } 696 }
693 697
694 bool wants_file_access() const { return wants_file_access_; } 698 bool wants_file_access() const { return wants_file_access_; }
695 int creation_flags() const { return creation_flags_; } 699 int creation_flags() const { return creation_flags_; }
696 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } 700 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; }
697 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } 701 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; }
702 bool was_installed_by_default() const {
703 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0;
704 }
698 705
699 // App-related. 706 // App-related.
700 bool is_app() const { 707 bool is_app() const {
701 return is_packaged_app() || is_hosted_app() || is_platform_app(); 708 return is_packaged_app() || is_hosted_app() || is_platform_app();
702 } 709 }
703 bool is_platform_app() const; 710 bool is_platform_app() const;
704 bool is_hosted_app() const; 711 bool is_hosted_app() const;
705 bool is_packaged_app() const; 712 bool is_packaged_app() const;
706 bool is_storage_isolated() const { return is_storage_isolated_; } 713 bool is_storage_isolated() const { return is_storage_isolated_; }
707 const URLPatternSet& web_extent() const { return extent_; } 714 const URLPatternSet& web_extent() const { return extent_; }
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 1207
1201 UpdatedExtensionPermissionsInfo( 1208 UpdatedExtensionPermissionsInfo(
1202 const Extension* extension, 1209 const Extension* extension,
1203 const PermissionSet* permissions, 1210 const PermissionSet* permissions,
1204 Reason reason); 1211 Reason reason);
1205 }; 1212 };
1206 1213
1207 } // namespace extensions 1214 } // namespace extensions
1208 1215
1209 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 1216 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_provider_impl.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698