OLD | NEW |
---|---|
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 #ifndef EXTENSIONS_COMMON_EXTENSION_H_ | 5 #ifndef EXTENSIONS_COMMON_EXTENSION_H_ |
6 #define EXTENSIONS_COMMON_EXTENSION_H_ | 6 #define EXTENSIONS_COMMON_EXTENSION_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 #include <map> | 10 #include <map> |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
323 const extensions::Manifest* manifest() const { | 323 const extensions::Manifest* manifest() const { |
324 return manifest_.get(); | 324 return manifest_.get(); |
325 } | 325 } |
326 bool wants_file_access() const { return wants_file_access_; } | 326 bool wants_file_access() const { return wants_file_access_; } |
327 // TODO(rdevlin.cronin): This is needed for ContentScriptsHandler, and should | 327 // TODO(rdevlin.cronin): This is needed for ContentScriptsHandler, and should |
328 // be moved out as part of crbug.com/159265. This should not be used anywhere | 328 // be moved out as part of crbug.com/159265. This should not be used anywhere |
329 // else. | 329 // else. |
330 void set_wants_file_access(bool wants_file_access) { | 330 void set_wants_file_access(bool wants_file_access) { |
331 wants_file_access_ = wants_file_access; | 331 wants_file_access_ = wants_file_access; |
332 } | 332 } |
333 bool is_syncable() const { return is_syncable_; } | |
334 void set_is_syncable(bool is_syncable) { is_syncable_ = is_syncable; } | |
not at google - send to devlin
2014/06/06 19:15:05
why did you need to add this here? it should be *o
xiyuan
2014/06/06 19:24:30
sync_helper:: IsSyncable and friends make their de
not at google - send to devlin
2014/06/06 19:37:16
I see. That's... wrong. Sync helper should query p
xiyuan
2014/06/09 20:59:59
This is removed. The info is now passed via OnExte
| |
333 int creation_flags() const { return creation_flags_; } | 335 int creation_flags() const { return creation_flags_; } |
334 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } | 336 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } |
335 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } | 337 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } |
336 bool was_installed_by_default() const { | 338 bool was_installed_by_default() const { |
337 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; | 339 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; |
338 } | 340 } |
339 bool was_installed_by_oem() const { | 341 bool was_installed_by_oem() const { |
340 return (creation_flags_ & WAS_INSTALLED_BY_OEM) != 0; | 342 return (creation_flags_ & WAS_INSTALLED_BY_OEM) != 0; |
341 } | 343 } |
342 | 344 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
467 bool display_in_launcher_; | 469 bool display_in_launcher_; |
468 | 470 |
469 // Should this app be shown in the browser New Tab Page. | 471 // Should this app be shown in the browser New Tab Page. |
470 bool display_in_new_tab_page_; | 472 bool display_in_new_tab_page_; |
471 | 473 |
472 // Whether the extension has host permissions or user script patterns that | 474 // Whether the extension has host permissions or user script patterns that |
473 // imply access to file:/// scheme URLs (the user may not have actually | 475 // imply access to file:/// scheme URLs (the user may not have actually |
474 // granted it that access). | 476 // granted it that access). |
475 bool wants_file_access_; | 477 bool wants_file_access_; |
476 | 478 |
479 // Whether this app is syncable to other devices. | |
480 bool is_syncable_; | |
481 | |
477 // The flags that were passed to InitFromValue. | 482 // The flags that were passed to InitFromValue. |
478 int creation_flags_; | 483 int creation_flags_; |
479 | 484 |
480 DISALLOW_COPY_AND_ASSIGN(Extension); | 485 DISALLOW_COPY_AND_ASSIGN(Extension); |
481 }; | 486 }; |
482 | 487 |
483 typedef std::vector<scoped_refptr<const Extension> > ExtensionList; | 488 typedef std::vector<scoped_refptr<const Extension> > ExtensionList; |
484 typedef std::set<ExtensionId> ExtensionIdSet; | 489 typedef std::set<ExtensionId> ExtensionIdSet; |
485 typedef std::vector<ExtensionId> ExtensionIdList; | 490 typedef std::vector<ExtensionId> ExtensionIdList; |
486 | 491 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
561 | 566 |
562 UpdatedExtensionPermissionsInfo( | 567 UpdatedExtensionPermissionsInfo( |
563 const Extension* extension, | 568 const Extension* extension, |
564 const PermissionSet* permissions, | 569 const PermissionSet* permissions, |
565 Reason reason); | 570 Reason reason); |
566 }; | 571 }; |
567 | 572 |
568 } // namespace extensions | 573 } // namespace extensions |
569 | 574 |
570 #endif // EXTENSIONS_COMMON_EXTENSION_H_ | 575 #endif // EXTENSIONS_COMMON_EXTENSION_H_ |
OLD | NEW |