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

Side by Side Diff: extensions/browser/quota_service_unittest.cc

Issue 2351823004: [Extensions] Consolidate ExtensionFunction::SendResponse()s (Closed)
Patch Set: lazyboy's Created 4 years, 3 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
« no previous file with comments | « extensions/browser/extension_function.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/process/process.h" 9 #include "base/process/process.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 class MockFunction : public ExtensionFunction { 64 class MockFunction : public ExtensionFunction {
65 public: 65 public:
66 explicit MockFunction(const char* name) { set_name(name); } 66 explicit MockFunction(const char* name) { set_name(name); }
67 67
68 void SetArgs(const base::ListValue* args) override {} 68 void SetArgs(const base::ListValue* args) override {}
69 std::string GetError() const override { return std::string(); } 69 std::string GetError() const override { return std::string(); }
70 void SetError(const std::string& error) override {} 70 void SetError(const std::string& error) override {}
71 void Destruct() const override { delete this; } 71 void Destruct() const override { delete this; }
72 ResponseAction Run() override { return RespondLater(); } 72 ResponseAction Run() override { return RespondLater(); }
73 void SendResponse(bool) override {}
74 73
75 protected: 74 protected:
76 ~MockFunction() override {} 75 ~MockFunction() override {}
77 }; 76 };
78 77
79 class TimedLimitMockFunction : public MockFunction { 78 class TimedLimitMockFunction : public MockFunction {
80 public: 79 public:
81 explicit TimedLimitMockFunction(const char* name) : MockFunction(name) {} 80 explicit TimedLimitMockFunction(const char* name) : MockFunction(name) {}
82 void GetQuotaLimitHeuristics( 81 void GetQuotaLimitHeuristics(
83 QuotaLimitHeuristics* heuristics) const override { 82 QuotaLimitHeuristics* heuristics) const override {
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 EXPECT_NE("", service_->Assess(extension_a_, f.get(), &arg, 324 EXPECT_NE("", service_->Assess(extension_a_, f.get(), &arg,
326 kStartTime + TimeDelta::FromDays(1) + 325 kStartTime + TimeDelta::FromDays(1) +
327 TimeDelta::FromSeconds(25))); 326 TimeDelta::FromSeconds(25)));
328 327
329 // Like now. 328 // Like now.
330 EXPECT_EQ("", service_->Assess(extension_a_, f.get(), &arg, 329 EXPECT_EQ("", service_->Assess(extension_a_, f.get(), &arg,
331 kStartTime + TimeDelta::FromDays(2))); 330 kStartTime + TimeDelta::FromDays(2)));
332 } 331 }
333 332
334 } // namespace extensions 333 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/extension_function.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698