OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_ACTIONS_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_ACTIONS_H_ |
| 7 |
| 8 #include <string> |
| 9 #include "base/memory/ref_counted_memory.h" |
| 10 #include "base/values.h" |
| 11 #include "chrome/browser/history/url_database.h" |
| 12 #include "sql/connection.h" |
| 13 #include "sql/transaction.h" |
| 14 |
| 15 namespace extensions { |
| 16 |
| 17 // This is the interface for extension actions that are to be recorded in |
| 18 // the activity log. |
| 19 class Action : public base::RefCountedThreadSafe<Action> { |
| 20 public: |
| 21 // Record the action in the database. |
| 22 virtual void Record(sql::Connection* db) = 0; |
| 23 |
| 24 // Print an action with il8n substitutions for display. |
| 25 virtual std::string PrettyPrintFori18n() = 0; |
| 26 |
| 27 // Print an action as a regular string for debugging purposes. |
| 28 virtual std::string PrettyPrintForDebug() = 0; |
| 29 |
| 30 protected: |
| 31 Action() {} |
| 32 virtual ~Action() {} |
| 33 |
| 34 private: |
| 35 friend class base::RefCountedThreadSafe<Action>; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(Action); |
| 38 }; |
| 39 |
| 40 } // namespace extensions |
| 41 |
| 42 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_ACTIONS_H_ |
| 43 |
OLD | NEW |