| OLD | NEW |
| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 void ProcessAction(scoped_refptr<Action> action) override; | 31 void ProcessAction(scoped_refptr<Action> action) override; |
| 32 | 32 |
| 33 void ReadFilteredData( | 33 void ReadFilteredData( |
| 34 const std::string& extension_id, | 34 const std::string& extension_id, |
| 35 const Action::ActionType type, | 35 const Action::ActionType type, |
| 36 const std::string& api_name, | 36 const std::string& api_name, |
| 37 const std::string& page_url, | 37 const std::string& page_url, |
| 38 const std::string& arg_url, | 38 const std::string& arg_url, |
| 39 const int days_ago, | 39 const int days_ago, |
| 40 const base::Callback<void(scoped_ptr<Action::ActionVector>)>& callback) | 40 const base::Callback<void(std::unique_ptr<Action::ActionVector>)>& |
| 41 override; | 41 callback) override; |
| 42 | 42 |
| 43 void Close() override; | 43 void Close() override; |
| 44 | 44 |
| 45 // Remove the actions stored for this policy according to the passed IDs. | 45 // Remove the actions stored for this policy according to the passed IDs. |
| 46 void RemoveActions(const std::vector<int64_t>& action_ids) override; | 46 void RemoveActions(const std::vector<int64_t>& action_ids) override; |
| 47 | 47 |
| 48 // Clean the URL data stored for this policy. | 48 // Clean the URL data stored for this policy. |
| 49 void RemoveURLs(const std::vector<GURL>& restrict_urls) override; | 49 void RemoveURLs(const std::vector<GURL>& restrict_urls) override; |
| 50 | 50 |
| 51 // Clean the data related to this extension for this policy. | 51 // Clean the data related to this extension for this policy. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 // batching is turned on. Should only be accessed from the database thread. | 98 // batching is turned on. Should only be accessed from the database thread. |
| 99 Action::ActionVector queued_actions_; | 99 Action::ActionVector queued_actions_; |
| 100 | 100 |
| 101 private: | 101 private: |
| 102 // Adds an Action to queued_actions_; this should be invoked only on the | 102 // Adds an Action to queued_actions_; this should be invoked only on the |
| 103 // database thread. | 103 // database thread. |
| 104 void QueueAction(scoped_refptr<Action> action); | 104 void QueueAction(scoped_refptr<Action> action); |
| 105 | 105 |
| 106 // Internal method to read data from the database; called on the database | 106 // Internal method to read data from the database; called on the database |
| 107 // thread. | 107 // thread. |
| 108 scoped_ptr<Action::ActionVector> DoReadFilteredData( | 108 std::unique_ptr<Action::ActionVector> DoReadFilteredData( |
| 109 const std::string& extension_id, | 109 const std::string& extension_id, |
| 110 const Action::ActionType type, | 110 const Action::ActionType type, |
| 111 const std::string& api_name, | 111 const std::string& api_name, |
| 112 const std::string& page_url, | 112 const std::string& page_url, |
| 113 const std::string& arg_url, | 113 const std::string& arg_url, |
| 114 const int days_ago); | 114 const int days_ago); |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 } // namespace extensions | 117 } // namespace extensions |
| 118 | 118 |
| 119 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_FULLSTREAM_UI_POLICY_H_ | 119 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_FULLSTREAM_UI_POLICY_H_ |
| OLD | NEW |