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

Side by Side Diff: chrome/browser/extensions/extension_function.h

Issue 8491033: Extension Settings API: throttle the API in the same way that the Bookmarks API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 years, 1 month 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <string> 10 #include <string>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // SetArgs(), set_request_id(), and the other setters before calling this 75 // SetArgs(), set_request_id(), and the other setters before calling this
76 // method. Derived classes should be ready to return GetResult() and 76 // method. Derived classes should be ready to return GetResult() and
77 // GetError() before returning from this function. 77 // GetError() before returning from this function.
78 // Note that once Run() returns, dispatcher() can be NULL, so be sure to 78 // Note that once Run() returns, dispatcher() can be NULL, so be sure to
79 // NULL-check. 79 // NULL-check.
80 virtual void Run(); 80 virtual void Run();
81 81
82 // Returns a quota limit heuristic suitable for this function. 82 // Returns a quota limit heuristic suitable for this function.
83 // No quota limiting by default. 83 // No quota limiting by default.
84 virtual void GetQuotaLimitHeuristics( 84 virtual void GetQuotaLimitHeuristics(
85 std::list<QuotaLimitHeuristic*>* heuristics) const {} 85 QuotaLimitHeuristics* heuristics) const {}
86 86
87 // Called when the quota limit has been exceeded. The default implementation 87 // Called when the quota limit has been exceeded. The default implementation
88 // returns an error. 88 // returns an error.
89 virtual void OnQuotaExceeded(); 89 virtual void OnQuotaExceeded();
90 90
91 // Specifies the raw arguments to the function, as a JSON value. 91 // Specifies the raw arguments to the function, as a JSON value.
92 virtual void SetArgs(const base::ListValue* args); 92 virtual void SetArgs(const base::ListValue* args);
93 93
94 // Retrieves the results of the function as a JSON-encoded string (may 94 // Retrieves the results of the function as a JSON-encoded string (may
95 // be empty). 95 // be empty).
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 public: 381 public:
382 SyncIOThreadExtensionFunction(); 382 SyncIOThreadExtensionFunction();
383 383
384 virtual void Run() OVERRIDE; 384 virtual void Run() OVERRIDE;
385 385
386 protected: 386 protected:
387 virtual ~SyncIOThreadExtensionFunction(); 387 virtual ~SyncIOThreadExtensionFunction();
388 }; 388 };
389 389
390 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ 390 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_extension_api.h ('k') | chrome/browser/extensions/extension_webrequest_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698