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

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

Issue 10232004: Only apply extension throttling quota to sync, not local. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 void ExtensionFunction::SetError(const std::string& error) { 101 void ExtensionFunction::SetError(const std::string& error) {
102 error_ = error; 102 error_ = error;
103 } 103 }
104 104
105 void ExtensionFunction::Run() { 105 void ExtensionFunction::Run() {
106 if (!RunImpl()) 106 if (!RunImpl())
107 SendResponse(false); 107 SendResponse(false);
108 } 108 }
109 109
110 bool ExtensionFunction::ShouldSkipQuotaLimiting() const {
111 return false;
112 }
113
110 bool ExtensionFunction::HasOptionalArgument(size_t index) { 114 bool ExtensionFunction::HasOptionalArgument(size_t index) {
111 Value* value; 115 Value* value;
112 return args_->Get(index, &value) && !value->IsType(Value::TYPE_NULL); 116 return args_->Get(index, &value) && !value->IsType(Value::TYPE_NULL);
113 } 117 }
114 118
115 void ExtensionFunction::SendResponseImpl(base::ProcessHandle process, 119 void ExtensionFunction::SendResponseImpl(base::ProcessHandle process,
116 IPC::Message::Sender* ipc_sender, 120 IPC::Message::Sender* ipc_sender,
117 int routing_id, 121 int routing_id,
118 bool success) { 122 bool success) {
119 DCHECK(ipc_sender); 123 DCHECK(ipc_sender);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 239
236 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() { 240 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() {
237 } 241 }
238 242
239 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() { 243 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() {
240 } 244 }
241 245
242 void SyncIOThreadExtensionFunction::Run() { 246 void SyncIOThreadExtensionFunction::Run() {
243 SendResponse(RunImpl()); 247 SendResponse(RunImpl());
244 } 248 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_function.h ('k') | chrome/browser/extensions/extensions_quota_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698