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/extension_processes_api.h" | 5 #include "chrome/browser/extensions/extension_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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 SendResponse(false); | 645 SendResponse(false); |
646 } else { | 646 } else { |
647 SetResult(Value::CreateBooleanValue(killed)); | 647 SetResult(Value::CreateBooleanValue(killed)); |
648 SendResponse(true); | 648 SendResponse(true); |
649 } | 649 } |
650 | 650 |
651 // Balance the AddRef in the RunImpl. | 651 // Balance the AddRef in the RunImpl. |
652 Release(); | 652 Release(); |
653 } | 653 } |
654 | 654 |
655 GetProcessInfoFunction::GetProcessInfoFunction() { | 655 GetProcessInfoFunction::GetProcessInfoFunction() : memory_(false) { |
656 } | 656 } |
657 | 657 |
658 GetProcessInfoFunction::~GetProcessInfoFunction() { | 658 GetProcessInfoFunction::~GetProcessInfoFunction() { |
659 } | 659 } |
660 | 660 |
661 bool GetProcessInfoFunction::RunImpl() { | 661 bool GetProcessInfoFunction::RunImpl() { |
662 #if defined(ENABLE_TASK_MANAGER) | 662 #if defined(ENABLE_TASK_MANAGER) |
663 Value* processes = NULL; | 663 Value* processes = NULL; |
664 | 664 |
665 EXTENSION_FUNCTION_VALIDATE(args_->Get(0, &processes)); | 665 EXTENSION_FUNCTION_VALIDATE(args_->Get(0, &processes)); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 DCHECK(process_ids_.size() == 0); | 744 DCHECK(process_ids_.size() == 0); |
745 } | 745 } |
746 | 746 |
747 SetResult(processes); | 747 SetResult(processes); |
748 SendResponse(true); | 748 SendResponse(true); |
749 | 749 |
750 // Balance the AddRef in the RunImpl. | 750 // Balance the AddRef in the RunImpl. |
751 Release(); | 751 Release(); |
752 #endif // defined(ENABLE_TASK_MANAGER) | 752 #endif // defined(ENABLE_TASK_MANAGER) |
753 } | 753 } |
OLD | NEW |