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

Unified Diff: chrome/renderer/extensions/activity_log_value_converter.h

Issue 19730002: V8ValueConverter for the activity logger that does not invoke interceptors and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix and comments Created 7 years, 5 months 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/renderer/extensions/activity_log_value_converter.h
diff --git a/chrome/renderer/extensions/activity_log_value_converter.h b/chrome/renderer/extensions/activity_log_value_converter.h
new file mode 100644
index 0000000000000000000000000000000000000000..5fd9f82866f7db73e96c3d6666be5e3a5b1ce1be
--- /dev/null
+++ b/chrome/renderer/extensions/activity_log_value_converter.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_RENDERER_EXTENSIONS_ACTIVITY_LOG_VALUE_CONVERTER_H_
+#define CHROME_RENDERER_EXTENSIONS_ACTIVITY_LOG_VALUE_CONVERTER_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "content/public/renderer/v8_value_converter.h"
+#include "v8/include/v8.h"
+
+namespace base {
+class Value;
+}
+
+namespace extensions {
+
+// ActivityLogValueConverter is used by activity logging to convert V8 values to
+// base values. It is similar to V8ValueConverter and makes use of
+// V8ValueConverter; however, it makes sure that none of the accessors and
+// interceptors are invoked when converting JS objects.
+
+class ActivityLogValueConverter {
+ public:
+ ActivityLogValueConverter();
+ virtual ~ActivityLogValueConverter();
+
+ base::Value* FromV8Value(v8::Handle<v8::Value> value,
+ v8::Handle<v8::Context> context) const;
+ private:
+ scoped_ptr<content::V8ValueConverter> v8_value_converter_;
+
+ DISALLOW_COPY_AND_ASSIGN(ActivityLogValueConverter);
+};
+
+} // namespace extensions
+
+#endif // CHROME_RENDERER_EXTENSIONS_ACTIVITY_LOG_VALUE_CONVERTER_H_
+

Powered by Google App Engine
This is Rietveld 408576698