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

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

Issue 10871034: Make all quota-exceeding messages in the storage API explain what the failure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update... the other error message Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // this function to |heuristics|. The ownership of the new QuotaLimitHeuristic 111 // this function to |heuristics|. The ownership of the new QuotaLimitHeuristic
112 // instances is passed to the owner of |heuristics|. 112 // instances is passed to the owner of |heuristics|.
113 // No quota limiting by default. 113 // No quota limiting by default.
114 // 114 //
115 // Only called once per lifetime of the ExtensionsQuotaService. 115 // Only called once per lifetime of the ExtensionsQuotaService.
116 virtual void GetQuotaLimitHeuristics( 116 virtual void GetQuotaLimitHeuristics(
117 QuotaLimitHeuristics* heuristics) const {} 117 QuotaLimitHeuristics* heuristics) const {}
118 118
119 // Called when the quota limit has been exceeded. The default implementation 119 // Called when the quota limit has been exceeded. The default implementation
120 // returns an error. 120 // returns an error.
121 virtual void OnQuotaExceeded(); 121 virtual void OnQuotaExceeded(const std::string& violation_error);
122 122
123 // Specifies the raw arguments to the function, as a JSON value. 123 // Specifies the raw arguments to the function, as a JSON value.
124 virtual void SetArgs(const base::ListValue* args); 124 virtual void SetArgs(const base::ListValue* args);
125 125
126 // Sets a single Value as the results of the function. 126 // Sets a single Value as the results of the function.
127 void SetResult(base::Value* result); 127 void SetResult(base::Value* result);
128 128
129 // Retrieves the results of the function as a ListValue. 129 // Retrieves the results of the function as a ListValue.
130 const base::ListValue* GetResultList(); 130 const base::ListValue* GetResultList();
131 131
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 public: 443 public:
444 SyncIOThreadExtensionFunction(); 444 SyncIOThreadExtensionFunction();
445 445
446 virtual void Run() OVERRIDE; 446 virtual void Run() OVERRIDE;
447 447
448 protected: 448 protected:
449 virtual ~SyncIOThreadExtensionFunction(); 449 virtual ~SyncIOThreadExtensionFunction();
450 }; 450 };
451 451
452 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ 452 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/web_request/web_request_api.cc ('k') | chrome/browser/extensions/extension_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698