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

Side by Side Diff: chrome/renderer/extensions/activity_log_converter_strategy.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: Dan's comment Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_RENDERER_EXTENSIONS_ACTIVITY_LOG_CONVERTER_STRATEGY_H_
6 #define CHROME_RENDERER_EXTENSIONS_ACTIVITY_LOG_CONVERTER_STRATEGY_H_
7
8 #include "base/compiler_specific.h"
9 #include "content/public/renderer/v8_value_converter.h"
10 #include "v8/include/v8.h"
11
12 namespace extensions {
13
14 // This class is used by activity logger and extends behavior of
15 // V8ValueConverter. It overwrites conversion of V8 arrays and objects. When
16 // converting arrays and objects, we must not invoke any JS code which may
17 // result in triggering activity logger. In such case, the log entries will be
18 // generated due to V8 object conversion rather than extension activity.
19 class ActivityLogConverterStrategy
20 : public content::V8ValueConverter::Strategy {
21 public:
22 virtual ~ActivityLogConverterStrategy() {}
23
24 virtual bool FromV8Object(v8::Handle<v8::Object> value,
25 base::Value** out) const OVERRIDE;
26 virtual bool FromV8Array(v8::Handle<v8::Array> value,
27 base::Value** out) const OVERRIDE;
28
29 private:
30 bool FromV8ObjectInternal(v8::Handle<v8::Object> value,
31 base::Value** out) const;
32 };
33
34 } // namespace extensions
35
36 #endif // CHROME_RENDERER_EXTENSIONS_ACTIVITY_LOG_CONVERTER_STRATEGY_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/renderer/extensions/activity_log_converter_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698