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

Side by Side Diff: extensions/common/manifest_url_handlers.h

Issue 664933004: Standardize usage of virtual/override/final in extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 EXTENSIONS_COMMON_MANIFEST_URL_HANDLERS_H_ 5 #ifndef EXTENSIONS_COMMON_MANIFEST_URL_HANDLERS_H_
6 #define EXTENSIONS_COMMON_MANIFEST_URL_HANDLERS_H_ 6 #define EXTENSIONS_COMMON_MANIFEST_URL_HANDLERS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "extensions/common/extension.h" 10 #include "extensions/common/extension.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 static const GURL& GetAboutPage(const Extension* extension); 45 static const GURL& GetAboutPage(const Extension* extension);
46 46
47 // Returns the webstore page URL for this extension. 47 // Returns the webstore page URL for this extension.
48 static const GURL GetDetailsURL(const Extension* extension); 48 static const GURL GetDetailsURL(const Extension* extension);
49 }; 49 };
50 50
51 // Parses the "homepage_url" manifest key. 51 // Parses the "homepage_url" manifest key.
52 class HomepageURLHandler : public ManifestHandler { 52 class HomepageURLHandler : public ManifestHandler {
53 public: 53 public:
54 HomepageURLHandler(); 54 HomepageURLHandler();
55 virtual ~HomepageURLHandler(); 55 ~HomepageURLHandler() override;
56 56
57 virtual bool Parse(Extension* extension, base::string16* error) override; 57 bool Parse(Extension* extension, base::string16* error) override;
58 58
59 private: 59 private:
60 virtual const std::vector<std::string> Keys() const override; 60 const std::vector<std::string> Keys() const override;
61 61
62 DISALLOW_COPY_AND_ASSIGN(HomepageURLHandler); 62 DISALLOW_COPY_AND_ASSIGN(HomepageURLHandler);
63 }; 63 };
64 64
65 // Parses the "update_url" manifest key. 65 // Parses the "update_url" manifest key.
66 class UpdateURLHandler : public ManifestHandler { 66 class UpdateURLHandler : public ManifestHandler {
67 public: 67 public:
68 UpdateURLHandler(); 68 UpdateURLHandler();
69 virtual ~UpdateURLHandler(); 69 ~UpdateURLHandler() override;
70 70
71 virtual bool Parse(Extension* extension, base::string16* error) override; 71 bool Parse(Extension* extension, base::string16* error) override;
72 72
73 private: 73 private:
74 virtual const std::vector<std::string> Keys() const override; 74 const std::vector<std::string> Keys() const override;
75 75
76 DISALLOW_COPY_AND_ASSIGN(UpdateURLHandler); 76 DISALLOW_COPY_AND_ASSIGN(UpdateURLHandler);
77 }; 77 };
78 78
79 // Parses the "about_page" manifest key. 79 // Parses the "about_page" manifest key.
80 // TODO(sashab): Make this and any other similar handlers extend from the same 80 // TODO(sashab): Make this and any other similar handlers extend from the same
81 // abstract class, URLManifestHandler, which has pure virtual methods for 81 // abstract class, URLManifestHandler, which has pure virtual methods for
82 // detecting the required URL type (relative or absolute) and abstracts the 82 // detecting the required URL type (relative or absolute) and abstracts the
83 // URL parsing logic away. 83 // URL parsing logic away.
84 class AboutPageHandler : public ManifestHandler { 84 class AboutPageHandler : public ManifestHandler {
85 public: 85 public:
86 AboutPageHandler(); 86 AboutPageHandler();
87 virtual ~AboutPageHandler(); 87 ~AboutPageHandler() override;
88 88
89 virtual bool Parse(Extension* extension, base::string16* error) override; 89 bool Parse(Extension* extension, base::string16* error) override;
90 virtual bool Validate(const Extension* extension, 90 bool Validate(const Extension* extension,
91 std::string* error, 91 std::string* error,
92 std::vector<InstallWarning>* warnings) const override; 92 std::vector<InstallWarning>* warnings) const override;
93 93
94 private: 94 private:
95 virtual const std::vector<std::string> Keys() const override; 95 const std::vector<std::string> Keys() const override;
96 96
97 DISALLOW_COPY_AND_ASSIGN(AboutPageHandler); 97 DISALLOW_COPY_AND_ASSIGN(AboutPageHandler);
98 }; 98 };
99 99
100 } // namespace extensions 100 } // namespace extensions
101 101
102 #endif // EXTENSIONS_COMMON_MANIFEST_URL_HANDLERS_H_ 102 #endif // EXTENSIONS_COMMON_MANIFEST_URL_HANDLERS_H_
OLDNEW
« no previous file with comments | « extensions/common/manifest_handlers/webview_info.h ('k') | extensions/common/permissions/api_permission.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698