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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // User of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <string>
6 #include "base/logging.h"
7 #include "chrome/browser/extensions/blocked_actions.h"
8
9 namespace extensions {
10
11 const char* BlockedAction::kTableName = "activitylog_blocked";
12 const char* BlockedAction::kTableStructure = "("
13 "extension_id LONGVARCHAR NOT NULL, "
14 "time INTEGER NOT NULL, "
15 "blocked_action LONGVARCHAR NOT NULL, "
16 "reason LONGVARCHAR NOT NULL)";
17
18 BlockedAction::BlockedAction(const std::string& extension_id,
19 const std::string& blocked_action,
20 const std::string& reason,
21 const base::Time& time)
22 : extension_id_(extension_id),
23 blocked_action_(blocked_action),
24 reason_(reason),
25 time_(time) { }
26
27 BlockedAction::~BlockedAction() {
28 }
29
30 std::string BlockedAction::PrettyPrintFori18n() {
31 // TODO(felt): implement this for real when the UI is redesigned.
32 return PrettyPrintForDebug();
33 }
34
35 std::string BlockedAction::PrettyPrintForDebug() {
36 // TODO(felt): implement this for real when the UI is redesigned.
37 return "ID: " + extension_id_ + ", blocked action " + blocked_action_ +
38 ", reason: " + reason_;
39 }
40
41 } // namespace extensions
42
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698