OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |