summaryrefslogtreecommitdiffstats
path: root/extensions/browser/quota_service_unittest.cc
diff options
context:
space:
mode:
authorreillyg <reillyg@chromium.org>2015-02-10 16:13:11 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-11 00:13:36 +0000
commit9c2528cc8a92c0e34a70268e99ec599bcfb7d7fb (patch)
treeb2a73199504704bef950218101d256616d4a9dd9 /extensions/browser/quota_service_unittest.cc
parent98de73d11797b1b0ac7ac0b2f4234cb8f57bd2fc (diff)
downloadchromium_src-9c2528cc8a92c0e34a70268e99ec599bcfb7d7fb.zip
chromium_src-9c2528cc8a92c0e34a70268e99ec599bcfb7d7fb.tar.gz
chromium_src-9c2528cc8a92c0e34a70268e99ec599bcfb7d7fb.tar.bz2
Wrap extension function dispatch in a scoped profile block.
This patch creates an entry in chrome://profiler for each extension API function. Separate entries are already created for Chrome IPC messages but that leaves all extension APIs lumped under the ExtensionHostMsg_Request and ExtensionHostMsg_RequestForIOThread IPCs. To make the function name available for profiling I need to expose the long-lived string literal pointer from DECLARE_EXTENSION_FUNCTION instead of the std::string that is copied each time the function is initialized. Review URL: https://codereview.chromium.org/873293008 Cr-Commit-Position: refs/heads/master@{#315681}
Diffstat (limited to 'extensions/browser/quota_service_unittest.cc')
-rw-r--r--extensions/browser/quota_service_unittest.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/extensions/browser/quota_service_unittest.cc b/extensions/browser/quota_service_unittest.cc
index 193aa34..c5b7812 100644
--- a/extensions/browser/quota_service_unittest.cc
+++ b/extensions/browser/quota_service_unittest.cc
@@ -60,7 +60,7 @@ class MockMapper : public QuotaLimitHeuristic::BucketMapper {
class MockFunction : public ExtensionFunction {
public:
- explicit MockFunction(const std::string& name) { set_name(name); }
+ explicit MockFunction(const char* name) { set_name(name); }
void SetArgs(const base::ListValue* args) override {}
std::string GetError() const override { return std::string(); }
@@ -75,8 +75,7 @@ class MockFunction : public ExtensionFunction {
class TimedLimitMockFunction : public MockFunction {
public:
- explicit TimedLimitMockFunction(const std::string& name)
- : MockFunction(name) {}
+ explicit TimedLimitMockFunction(const char* name) : MockFunction(name) {}
void GetQuotaLimitHeuristics(
QuotaLimitHeuristics* heuristics) const override {
heuristics->push_back(
@@ -89,7 +88,7 @@ class TimedLimitMockFunction : public MockFunction {
class FrozenMockFunction : public MockFunction {
public:
- explicit FrozenMockFunction(const std::string& name) : MockFunction(name) {}
+ explicit FrozenMockFunction(const char* name) : MockFunction(name) {}
void GetQuotaLimitHeuristics(
QuotaLimitHeuristics* heuristics) const override {
heuristics->push_back(