| Index: chrome/browser/extensions/activity_log/activity_actions.h
|
| diff --git a/chrome/browser/extensions/activity_log/activity_actions.h b/chrome/browser/extensions/activity_log/activity_actions.h
|
| index 9e82f367ab1b912e5e1df8097fd258257a599c35..0dd0eca7c0602322475af171191e0ebe5c0764ce 100644
|
| --- a/chrome/browser/extensions/activity_log/activity_actions.h
|
| +++ b/chrome/browser/extensions/activity_log/activity_actions.h
|
| @@ -66,6 +66,17 @@ class Action : public base::RefCountedThreadSafe<Action> {
|
| NUM_INJECTION_TYPES
|
| };
|
|
|
| + // The type of ad which was injected.
|
| + enum AdType {
|
| + AD_TYPE_NONE,
|
| + AD_TYPE_IFRAME,
|
| + AD_TYPE_EMBED,
|
| + AD_TYPE_ANCHOR,
|
| +
|
| + // Place any new injection types above this entry.
|
| + NUM_AD_TYPES
|
| + };
|
| +
|
| // A useful shorthand for methods that take or return collections of Action
|
| // objects.
|
| typedef std::vector<scoped_refptr<Action> > ActionVector;
|
| @@ -166,14 +177,24 @@ class Action : public base::RefCountedThreadSafe<Action> {
|
| private:
|
| friend class base::RefCountedThreadSafe<Action>;
|
|
|
| + // Returns true if a given |url| could be an ad.
|
| + bool UrlCouldBeAd(const GURL& url) const;
|
| +
|
| // Uploads the URL to RAPPOR (preserving privacy) if this might have been an
|
| // ad injection.
|
| void MaybeUploadUrl(rappor::RapporService* rappor_service) const;
|
|
|
| - // Checks an action with the appendChild API for ad injection.
|
| - InjectionType CheckAppendChild() const;
|
| // Checks an action that modified the src of an element for ad injection.
|
| InjectionType CheckSrcModification() const;
|
| + // Checks an action with the appendChild API for ad injection.
|
| + // |ad_type_out| is populated with the type of ad which was injected, if there
|
| + // was an injection.
|
| + InjectionType CheckAppendChild(AdType* ad_type_out) const;
|
| + // Checks a DOM object (e.g. an appended child) for ad injection.
|
| + // |ad_type_out| is populated with the type of ad which was injected, if there
|
| + // was an injection.
|
| + InjectionType CheckDomObject(const base::DictionaryValue* object,
|
| + AdType* ad_type_out) const;
|
|
|
| std::string extension_id_;
|
| base::Time time_;
|
|
|