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

Unified Diff: chrome/browser/extensions/blocked_actions.cc

Issue 11421192: Save extension activity log to a file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Another small fix Created 8 years 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 side-by-side diff with in-line comments
Download patch
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* BlockedAction::kTableName = "activitylog_blocked";
+const char* BlockedAction::kTableStructure = "("
+ "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
+

Powered by Google App Engine
This is Rietveld 408576698