| 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 #include "chrome/browser/extensions/api/processes/processes_api.h" | 5 #include "chrome/browser/extensions/api/processes/processes_api.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 SendResponse(false); | 631 SendResponse(false); |
| 632 } else { | 632 } else { |
| 633 SetResult(Value::CreateBooleanValue(killed)); | 633 SetResult(Value::CreateBooleanValue(killed)); |
| 634 SendResponse(true); | 634 SendResponse(true); |
| 635 } | 635 } |
| 636 | 636 |
| 637 // Balance the AddRef in the RunImpl. | 637 // Balance the AddRef in the RunImpl. |
| 638 Release(); | 638 Release(); |
| 639 } | 639 } |
| 640 | 640 |
| 641 GetProcessInfoFunction::GetProcessInfoFunction() : memory_(false) { | 641 GetProcessInfoFunction::GetProcessInfoFunction() |
| 642 #if defined(ENABLE_TASK_MANAGER) |
| 643 : memory_(false) |
| 644 #endif |
| 645 { |
| 642 } | 646 } |
| 643 | 647 |
| 644 GetProcessInfoFunction::~GetProcessInfoFunction() { | 648 GetProcessInfoFunction::~GetProcessInfoFunction() { |
| 645 } | 649 } |
| 646 | 650 |
| 647 bool GetProcessInfoFunction::RunImpl() { | 651 bool GetProcessInfoFunction::RunImpl() { |
| 648 #if defined(ENABLE_TASK_MANAGER) | 652 #if defined(ENABLE_TASK_MANAGER) |
| 649 Value* processes = NULL; | 653 Value* processes = NULL; |
| 650 | 654 |
| 651 EXTENSION_FUNCTION_VALIDATE(args_->Get(0, &processes)); | 655 EXTENSION_FUNCTION_VALIDATE(args_->Get(0, &processes)); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 | 734 |
| 731 SetResult(processes); | 735 SetResult(processes); |
| 732 SendResponse(true); | 736 SendResponse(true); |
| 733 | 737 |
| 734 // Balance the AddRef in the RunImpl. | 738 // Balance the AddRef in the RunImpl. |
| 735 Release(); | 739 Release(); |
| 736 #endif // defined(ENABLE_TASK_MANAGER) | 740 #endif // defined(ENABLE_TASK_MANAGER) |
| 737 } | 741 } |
| 738 | 742 |
| 739 } // namespace extensions | 743 } // namespace extensions |
| OLD | NEW |