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

Side by Side Diff: chrome/browser/extensions/api/debugger/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: Synced. 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/api/debugger/debugger_api.h" 7 #include "chrome/browser/extensions/api/debugger/debugger_api.h"
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 DictionaryValue* dictionary) { 477 DictionaryValue* dictionary) {
478 Value* error_body; 478 Value* error_body;
479 if (dictionary->Get("error", &error_body)) { 479 if (dictionary->Get("error", &error_body)) {
480 base::JSONWriter::Write(error_body, &error_); 480 base::JSONWriter::Write(error_body, &error_);
481 SendResponse(false); 481 SendResponse(false);
482 return; 482 return;
483 } 483 }
484 484
485 Value* result_body; 485 Value* result_body;
486 if (dictionary->Get("result", &result_body)) 486 if (dictionary->Get("result", &result_body))
487 result_.reset(result_body->DeepCopy()); 487 SetResult(result_body->DeepCopy());
488 else 488 else
489 result_.reset(new DictionaryValue()); 489 SetResult(new DictionaryValue());
490 SendResponse(true); 490 SendResponse(true);
491 } 491 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698