Index: chrome/browser/extensions/blocked_actions.cc |
=================================================================== |
--- chrome/browser/extensions/blocked_actions.cc (revision 0) |
+++ chrome/browser/extensions/blocked_actions.cc (revision 0) |
@@ -0,0 +1,42 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// User of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include <string> |
+#include "base/logging.h" |
+#include "chrome/browser/extensions/blocked_actions.h" |
+ |
+namespace extensions { |
+ |
+const char* blocked_table_name_ = "activitylog_blocked"; |
+const char* blocked_table_structure_ = "(" |
+ "extension_id LONGVARCHAR NOT NULL, " |
+ "time INTEGER NOT NULL, " |
+ "blocked_action LONGVARCHAR NOT NULL, " |
+ "reason LONGVARCHAR NOT NULL)"; |
+ |
+BlockedAction::BlockedAction(const std::string& extension_id, |
+ const std::string& blocked_action, |
+ const std::string& reason, |
+ const base::Time& time) |
+ : extension_id_(extension_id), |
+ blocked_action_(blocked_action), |
+ reason_(reason), |
+ time_(time) { } |
+ |
+BlockedAction::~BlockedAction() { |
+} |
+ |
+std::string BlockedAction::PrettyPrintFori18n() { |
+ // TODO(felt): implement this for real when the UI is redesigned. |
+ return PrettyPrintForDebug(); |
+} |
+ |
+std::string BlockedAction::PrettyPrintForDebug() { |
+ // TODO(felt): implement this for real when the UI is redesigned. |
+ return "ID: " + extension_id_ + ", blocked action " + blocked_action_ + |
+ ", reason: " + reason_; |
+} |
+ |
+} // namespace extensions |
+ |