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

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

Issue 257333002: Drive extension functions from ExtensionFunction::Run. The (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 6 years, 7 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
« no previous file with comments | « extensions/browser/extension_function_dispatcher.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 "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "base/process/process.h" 6 #include "base/process/process.h"
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "content/public/test/test_browser_thread.h" 9 #include "content/public/test/test_browser_thread.h"
10 #include "extensions/browser/extension_function.h" 10 #include "extensions/browser/extension_function.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 }; 60 };
61 61
62 class MockFunction : public ExtensionFunction { 62 class MockFunction : public ExtensionFunction {
63 public: 63 public:
64 explicit MockFunction(const std::string& name) { set_name(name); } 64 explicit MockFunction(const std::string& name) { set_name(name); }
65 65
66 virtual void SetArgs(const base::ListValue* args) OVERRIDE {} 66 virtual void SetArgs(const base::ListValue* args) OVERRIDE {}
67 virtual std::string GetError() const OVERRIDE { return std::string(); } 67 virtual std::string GetError() const OVERRIDE { return std::string(); }
68 virtual void SetError(const std::string& error) OVERRIDE {} 68 virtual void SetError(const std::string& error) OVERRIDE {}
69 virtual void Destruct() const OVERRIDE { delete this; } 69 virtual void Destruct() const OVERRIDE { delete this; }
70 virtual bool RunImpl() OVERRIDE { return true; } 70 virtual ResponseAction Run() OVERRIDE { return RespondLater(); }
71 virtual void SendResponse(bool) OVERRIDE {} 71 virtual void SendResponse(bool) OVERRIDE {}
72 72
73 protected: 73 protected:
74 virtual ~MockFunction() {} 74 virtual ~MockFunction() {}
75 }; 75 };
76 76
77 class TimedLimitMockFunction : public MockFunction { 77 class TimedLimitMockFunction : public MockFunction {
78 public: 78 public:
79 explicit TimedLimitMockFunction(const std::string& name) 79 explicit TimedLimitMockFunction(const std::string& name)
80 : MockFunction(name) {} 80 : MockFunction(name) {}
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 "", 407 "",
408 service_->Assess( 408 service_->Assess(
409 extension_a_, f.get(), &arg, kStartTime + TimeDelta::FromDays(1))); 409 extension_a_, f.get(), &arg, kStartTime + TimeDelta::FromDays(1)));
410 EXPECT_NE( 410 EXPECT_NE(
411 "", 411 "",
412 service_->Assess( 412 service_->Assess(
413 extension_a_, g.get(), &arg, kStartTime + TimeDelta::FromDays(1))); 413 extension_a_, g.get(), &arg, kStartTime + TimeDelta::FromDays(1)));
414 } 414 }
415 415
416 } // namespace extensions 416 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/extension_function_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698