Chromium Code Reviews| 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 CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_PAGE_ACTION_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_STORAGE_STORAGE_SCHEMA_MANIFEST_HANDLER_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_PAGE_ACTION_HANDLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_STORAGE_SCHEMA_MANIFEST_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include "base/basictypes.h" |
| 9 | |
| 10 #include "chrome/common/extensions/api/extension_action/action_info.h" | |
| 11 #include "chrome/common/extensions/extension.h" | |
| 12 #include "chrome/common/extensions/manifest_handler.h" | 9 #include "chrome/common/extensions/manifest_handler.h" |
| 13 | 10 |
| 14 namespace extensions { | 11 namespace extensions { |
| 15 | 12 |
| 16 // Parses the "page_action" manifest key. | 13 // Handles the "storage.managed_schema" manifest key. |
| 17 class PageActionHandler : public ManifestHandler { | 14 class StorageSchemaManifestHandler : public ManifestHandler { |
|
not at google - send to devlin
2013/05/23 16:56:18
bleh is there some way to tell git that this isn't
Joao da Silva
2013/05/24 21:31:49
Uploaded with --no-find-copies, let's see what it
| |
| 18 public: | 15 public: |
|
not at google - send to devlin
2013/05/23 16:56:18
pls quickly unit test the parsing here.
Joao da Silva
2013/05/24 21:31:49
Done.
| |
| 19 PageActionHandler(); | 16 StorageSchemaManifestHandler(); |
| 20 virtual ~PageActionHandler(); | 17 virtual ~StorageSchemaManifestHandler(); |
| 21 | 18 |
| 19 // ManifestHandler implementation: | |
| 22 virtual bool Parse(Extension* extension, string16* error) OVERRIDE; | 20 virtual bool Parse(Extension* extension, string16* error) OVERRIDE; |
| 23 virtual bool Validate(const Extension* extension, | 21 virtual bool Validate(const Extension* extension, |
| 24 std::string* error, | 22 std::string* error, |
| 25 std::vector<InstallWarning>* warnings) const OVERRIDE; | 23 std::vector<InstallWarning>* warnings) const OVERRIDE; |
| 24 virtual const std::vector<std::string> Keys() const OVERRIDE; | |
|
not at google - send to devlin
2013/05/23 16:56:18
surely one or all of these can be private
Joao da Silva
2013/05/24 21:31:49
Done.
| |
| 26 | 25 |
| 27 private: | 26 private: |
| 28 virtual const std::vector<std::string> Keys() const OVERRIDE; | 27 DISALLOW_COPY_AND_ASSIGN(StorageSchemaManifestHandler); |
| 29 | |
| 30 DISALLOW_COPY_AND_ASSIGN(PageActionHandler); | |
| 31 }; | 28 }; |
| 32 | 29 |
| 33 } // namespace extensions | 30 } // namespace extensions |
| 34 | 31 |
| 35 #endif // CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_PAGE_ACTION_HANDLER_H_ | 32 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_STORAGE_SCHEMA_MANIFEST_HANDLER _H_ |
| OLD | NEW |