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

Side by Side Diff: chrome/browser/extensions/activity_log/activity_actions.h

Issue 384983003: Enabling AdInjectionBrowserTest after Activity Log refactoring. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 6 years, 5 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/activity_log/activity_actions.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) 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_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_
6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 private: 178 private:
179 friend class base::RefCountedThreadSafe<Action>; 179 friend class base::RefCountedThreadSafe<Action>;
180 180
181 // Returns true if a given |url| could be an ad. 181 // Returns true if a given |url| could be an ad.
182 bool UrlCouldBeAd(const GURL& url) const; 182 bool UrlCouldBeAd(const GURL& url) const;
183 183
184 // Uploads the URL to RAPPOR (preserving privacy) if this might have been an 184 // Uploads the URL to RAPPOR (preserving privacy) if this might have been an
185 // ad injection. 185 // ad injection.
186 void MaybeUploadUrl(rappor::RapporService* rappor_service) const; 186 void MaybeUploadUrl(rappor::RapporService* rappor_service) const;
187 187
188 // Checks an action that modified the src of an element for ad injection. 188 // Checks an action that modified the src or href of an element for ad
189 InjectionType CheckSrcModification() const; 189 // injection.
190 // Checks an action with the appendChild API for ad injection. 190 InjectionType CheckAttrModification() const;
191 // |ad_type_out| is populated with the type of ad which was injected, if there 191 // Checks an action that adds an element for ad injection.
192 // was an injection. 192 InjectionType CheckElementAddition() const;
193 InjectionType CheckAppendChild(AdType* ad_type_out) const;
194 // Checks a DOM object (e.g. an appended child) for ad injection.
195 // |ad_type_out| is populated with the type of ad which was injected, if there
196 // was an injection.
197 InjectionType CheckDomObject(const base::DictionaryValue* object,
198 AdType* ad_type_out) const;
199 193
200 std::string extension_id_; 194 std::string extension_id_;
201 base::Time time_; 195 base::Time time_;
202 ActionType action_type_; 196 ActionType action_type_;
203 std::string api_name_; 197 std::string api_name_;
204 scoped_ptr<base::ListValue> args_; 198 scoped_ptr<base::ListValue> args_;
205 GURL page_url_; 199 GURL page_url_;
206 std::string page_title_; 200 std::string page_title_;
207 bool page_incognito_; 201 bool page_incognito_;
208 GURL arg_url_; 202 GURL arg_url_;
(...skipping 18 matching lines...) Expand all
227 // comparisons. 221 // comparisons.
228 struct ActionComparatorExcludingTimeAndActionId { 222 struct ActionComparatorExcludingTimeAndActionId {
229 // Evaluates the comparison lhs < rhs. 223 // Evaluates the comparison lhs < rhs.
230 bool operator()(const scoped_refptr<Action>& lhs, 224 bool operator()(const scoped_refptr<Action>& lhs,
231 const scoped_refptr<Action>& rhs) const; 225 const scoped_refptr<Action>& rhs) const;
232 }; 226 };
233 227
234 } // namespace extensions 228 } // namespace extensions
235 229
236 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ 230 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/activity_log/activity_actions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698