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

Side by Side Diff: chrome/browser/extensions/api/declarative_content/content_action.h

Issue 531823002: Properly initialize variables in RequestContentScript::ScriptData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also remove suppression Created 6 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/declarative_content/content_action.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 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 std::string* instance_type); 85 std::string* instance_type);
86 86
87 protected: 87 protected:
88 friend class base::RefCounted<ContentAction>; 88 friend class base::RefCounted<ContentAction>;
89 virtual ~ContentAction(); 89 virtual ~ContentAction();
90 }; 90 };
91 91
92 // Action that injects a content script. 92 // Action that injects a content script.
93 class RequestContentScript : public ContentAction { 93 class RequestContentScript : public ContentAction {
94 public: 94 public:
95 struct ScriptData { 95 struct ScriptData;
96 ScriptData();
97 ~ScriptData();
98
99 std::vector<std::string> css_file_names;
100 std::vector<std::string> js_file_names;
101 bool all_frames;
102 bool match_about_blank;
103 };
104 96
105 RequestContentScript(content::BrowserContext* browser_context, 97 RequestContentScript(content::BrowserContext* browser_context,
106 const Extension* extension, 98 const Extension* extension,
107 const ScriptData& script_data); 99 const ScriptData& script_data);
108 RequestContentScript(DeclarativeUserScriptMaster* master, 100 RequestContentScript(DeclarativeUserScriptMaster* master,
109 const Extension* extension, 101 const Extension* extension,
110 const ScriptData& script_data); 102 const ScriptData& script_data);
111 103
112 static scoped_refptr<ContentAction> Create( 104 static scoped_refptr<ContentAction> Create(
113 content::BrowserContext* browser_context, 105 content::BrowserContext* browser_context,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 DeclarativeUserScriptMaster* master_; 152 DeclarativeUserScriptMaster* master_;
161 153
162 DISALLOW_COPY_AND_ASSIGN(RequestContentScript); 154 DISALLOW_COPY_AND_ASSIGN(RequestContentScript);
163 }; 155 };
164 156
165 typedef DeclarativeActionSet<ContentAction> ContentActionSet; 157 typedef DeclarativeActionSet<ContentAction> ContentActionSet;
166 158
167 } // namespace extensions 159 } // namespace extensions
168 160
169 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_ 161 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/declarative_content/content_action.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698