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

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

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 #include "chrome/browser/extensions/extension_function.h" 5 #include "chrome/browser/extensions/extension_function.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/extensions/extension_function_dispatcher.h" 9 #include "chrome/browser/extensions/extension_function_dispatcher.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 81
82 IOThreadExtensionFunction* ExtensionFunction::AsIOThreadExtensionFunction() { 82 IOThreadExtensionFunction* ExtensionFunction::AsIOThreadExtensionFunction() {
83 return NULL; 83 return NULL;
84 } 84 }
85 85
86 bool ExtensionFunction::HasPermission() { 86 bool ExtensionFunction::HasPermission() {
87 return extension_->HasAPIPermission(name_); 87 return extension_->HasAPIPermission(name_);
88 } 88 }
89 89
90 void ExtensionFunction::OnQuotaExceeded() { 90 void ExtensionFunction::OnQuotaExceeded(const std::string& violation_error) {
91 error_ = QuotaLimitHeuristic::kGenericOverQuotaError; 91 error_ = violation_error;
92 SendResponse(false); 92 SendResponse(false);
93 } 93 }
94 94
95 void ExtensionFunction::SetArgs(const base::ListValue* args) { 95 void ExtensionFunction::SetArgs(const base::ListValue* args) {
96 DCHECK(!args_.get()); // Should only be called once. 96 DCHECK(!args_.get()); // Should only be called once.
97 args_.reset(args->DeepCopy()); 97 args_.reset(args->DeepCopy());
98 } 98 }
99 99
100 void ExtensionFunction::SetResult(base::Value* result) { 100 void ExtensionFunction::SetResult(base::Value* result) {
101 results_.reset(new base::ListValue()); 101 results_.reset(new base::ListValue());
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 307
308 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() { 308 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() {
309 } 309 }
310 310
311 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() { 311 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() {
312 } 312 }
313 313
314 void SyncIOThreadExtensionFunction::Run() { 314 void SyncIOThreadExtensionFunction::Run() {
315 SendResponse(RunImpl()); 315 SendResponse(RunImpl());
316 } 316 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_function.h ('k') | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698