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

Unified Diff: runtime/vm/coverage.h

Issue 351373002: Coverage API revamp (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: addressed comments Created 6 years, 6 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
« no previous file with comments | « no previous file | runtime/vm/coverage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/coverage.h
diff --git a/runtime/vm/coverage.h b/runtime/vm/coverage.h
index 72c639ae01844c7b531516fc877034e66619e72c..5cc1ec13b22b094aad6a0a0dd16ee30335a7afa7 100644
--- a/runtime/vm/coverage.h
+++ b/runtime/vm/coverage.h
@@ -23,20 +23,27 @@ class Library;
class Script;
class String;
+class CoverageFilter : public ValueObject {
+ public:
+ virtual bool ShouldOutputCoverageFor(const Library& lib,
+ const String& script_url,
+ const Class& cls,
+ const Function& func) const = 0;
+ virtual ~CoverageFilter() {}
+};
+
class CodeCoverage : public AllStatic {
public:
static void Write(Isolate* isolate);
- static void PrintJSON(Isolate* isolate, JSONStream* stream);
-
- static void PrintJSONForScript(const Script& script, JSONStream* stream);
- static void PrintJSONForLibrary(
- const Library& lib, const Script& script_filter, JSONStream* stream);
- static void PrintJSONForClass(const Class& lib, JSONStream* stream);
+ static void PrintJSON(Isolate* isolate,
+ JSONStream* stream,
+ CoverageFilter* filter);
private:
- static void PrintClass(const Class& cls,
+ static void PrintClass(const Library& lib,
+ const Class& cls,
const JSONArray& arr,
- const Script& script_filter);
+ CoverageFilter* filter);
static void CompileAndAdd(const Function& function,
const JSONArray& hits_arr,
const GrowableArray<intptr_t>& pos_to_line);
« no previous file with comments | « no previous file | runtime/vm/coverage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698