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

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

Issue 154053004: Introducing the activityLogPrivate.deleteActivities() API call. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebasing Created 6 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_FULLSTREAM_UI_POLICY_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_FULLSTREAM_UI_POLICY_H_
6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_FULLSTREAM_UI_POLICY_H_ 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_FULLSTREAM_UI_POLICY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/extensions/activity_log/activity_database.h" 10 #include "chrome/browser/extensions/activity_log/activity_database.h"
(...skipping 22 matching lines...) Expand all
33 const Action::ActionType type, 33 const Action::ActionType type,
34 const std::string& api_name, 34 const std::string& api_name,
35 const std::string& page_url, 35 const std::string& page_url,
36 const std::string& arg_url, 36 const std::string& arg_url,
37 const int days_ago, 37 const int days_ago,
38 const base::Callback 38 const base::Callback
39 <void(scoped_ptr<Action::ActionVector>)>& callback) OVERRIDE; 39 <void(scoped_ptr<Action::ActionVector>)>& callback) OVERRIDE;
40 40
41 virtual void Close() OVERRIDE; 41 virtual void Close() OVERRIDE;
42 42
43 // Remove the actions stored for this policy according to the passed IDs.
44 virtual void RemoveActions(const std::vector<int64>& action_ids) OVERRIDE;
45
43 // Clean the URL data stored for this policy. 46 // Clean the URL data stored for this policy.
44 virtual void RemoveURLs(const std::vector<GURL>& restrict_urls) OVERRIDE; 47 virtual void RemoveURLs(const std::vector<GURL>& restrict_urls) OVERRIDE;
45 48
46 // Clean the data related to this extension for this policy. 49 // Clean the data related to this extension for this policy.
47 virtual void RemoveExtensionData(const std::string& extension_id) OVERRIDE; 50 virtual void RemoveExtensionData(const std::string& extension_id) OVERRIDE;
48 51
49 // Delete everything in the database. 52 // Delete everything in the database.
50 virtual void DeleteDatabase() OVERRIDE; 53 virtual void DeleteDatabase() OVERRIDE;
51 54
52 // Database table schema. 55 // Database table schema.
(...skipping 13 matching lines...) Expand all
66 virtual bool FlushDatabase(sql::Connection* db) OVERRIDE; 69 virtual bool FlushDatabase(sql::Connection* db) OVERRIDE;
67 virtual void OnDatabaseFailure() OVERRIDE; 70 virtual void OnDatabaseFailure() OVERRIDE;
68 virtual void OnDatabaseClose() OVERRIDE; 71 virtual void OnDatabaseClose() OVERRIDE;
69 72
70 // Strips arguments if needed by policy. May return the original object (if 73 // Strips arguments if needed by policy. May return the original object (if
71 // unmodified), or a copy (if modifications were made). The implementation 74 // unmodified), or a copy (if modifications were made). The implementation
72 // in FullStreamUIPolicy returns the action unmodified. 75 // in FullStreamUIPolicy returns the action unmodified.
73 virtual scoped_refptr<Action> ProcessArguments( 76 virtual scoped_refptr<Action> ProcessArguments(
74 scoped_refptr<Action> action) const; 77 scoped_refptr<Action> action) const;
75 78
79 // The implementation of RemoveActions; this must only run on the database
80 // thread.
81 void DoRemoveActions(const std::vector<int64>& action_ids);
82
76 // The implementation of RemoveURLs; this must only run on the database 83 // The implementation of RemoveURLs; this must only run on the database
77 // thread. 84 // thread.
78 void DoRemoveURLs(const std::vector<GURL>& restrict_urls); 85 void DoRemoveURLs(const std::vector<GURL>& restrict_urls);
79 86
80 // The implementation of RemoveExtensionData; this must only run on the 87 // The implementation of RemoveExtensionData; this must only run on the
81 // database thread. 88 // database thread.
82 void DoRemoveExtensionData(const std::string& extension_id); 89 void DoRemoveExtensionData(const std::string& extension_id);
83 90
84 // The implementation of DeleteDatabase; this must only run on the database 91 // The implementation of DeleteDatabase; this must only run on the database
85 // thread. 92 // thread.
(...skipping 15 matching lines...) Expand all
101 const Action::ActionType type, 108 const Action::ActionType type,
102 const std::string& api_name, 109 const std::string& api_name,
103 const std::string& page_url, 110 const std::string& page_url,
104 const std::string& arg_url, 111 const std::string& arg_url,
105 const int days_ago); 112 const int days_ago);
106 }; 113 };
107 114
108 } // namespace extensions 115 } // namespace extensions
109 116
110 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_FULLSTREAM_UI_POLICY_H_ 117 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_FULLSTREAM_UI_POLICY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698