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

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

Issue 10694106: Added support for multiple parameters to Extension API callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Indentation fixes and comment. Created 8 years, 5 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
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 // Implements the Chrome Extensions Debugger API. 5 // Implements the Chrome Extensions Debugger API.
6 6
7 #include "chrome/browser/extensions/extension_debugger_api.h" 7 #include "chrome/browser/extensions/extension_debugger_api.h"
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 DictionaryValue* dictionary) { 478 DictionaryValue* dictionary) {
479 Value* error_body; 479 Value* error_body;
480 if (dictionary->Get("error", &error_body)) { 480 if (dictionary->Get("error", &error_body)) {
481 base::JSONWriter::Write(error_body, &error_); 481 base::JSONWriter::Write(error_body, &error_);
482 SendResponse(false); 482 SendResponse(false);
483 return; 483 return;
484 } 484 }
485 485
486 Value* result_body; 486 Value* result_body;
487 if (dictionary->Get("result", &result_body)) 487 if (dictionary->Get("result", &result_body))
488 result_.reset(result_body->DeepCopy()); 488 SetSingleResult(result_body->DeepCopy());
489 else 489 else
490 result_.reset(new DictionaryValue()); 490 SetSingleResult(new DictionaryValue());
491 SendResponse(true); 491 SendResponse(true);
492 } 492 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698