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

Side by Side Diff: chrome/browser/automation/automation_provider_observers.cc

Issue 10151005: cros: Log per-process memory use on low memory events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
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 #include "chrome/browser/automation/automation_provider_observers.h" 5 #include "chrome/browser/automation/automation_provider_observers.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 2700 matching lines...) Expand 10 before | Expand all | Expand 10 after
2711 2711
2712 ProcessInfoObserver::ProcessInfoObserver( 2712 ProcessInfoObserver::ProcessInfoObserver(
2713 AutomationProvider* automation, 2713 AutomationProvider* automation,
2714 IPC::Message* reply_message) 2714 IPC::Message* reply_message)
2715 : automation_(automation->AsWeakPtr()), 2715 : automation_(automation->AsWeakPtr()),
2716 reply_message_(reply_message) {} 2716 reply_message_(reply_message) {}
2717 2717
2718 ProcessInfoObserver::~ProcessInfoObserver() {} 2718 ProcessInfoObserver::~ProcessInfoObserver() {}
2719 2719
2720 void ProcessInfoObserver::OnDetailsAvailable() { 2720 void ProcessInfoObserver::OnDetailsAvailable() {
2721 // TODO(jamescook): Remove this. I don't think we want it for automated
2722 // tests, but it's how the system has always worked.
Greg Spencer (Chromium) 2012/04/20 00:28:21 Can you elaborate on what "this" and "it's" refer
2723 UpdateHistograms();
2724
2721 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); 2725 scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
2722 ListValue* browser_proc_list = new ListValue(); 2726 ListValue* browser_proc_list = new ListValue();
2723 const std::vector<ProcessData>& all_processes = processes(); 2727 const std::vector<ProcessData>& all_processes = processes();
2724 for (size_t index = 0; index < all_processes.size(); ++index) { 2728 for (size_t index = 0; index < all_processes.size(); ++index) {
2725 DictionaryValue* browser_data = new DictionaryValue(); 2729 DictionaryValue* browser_data = new DictionaryValue();
2726 browser_data->SetString("name", all_processes[index].name); 2730 browser_data->SetString("name", all_processes[index].name);
2727 browser_data->SetString("process_name", all_processes[index].process_name); 2731 browser_data->SetString("process_name", all_processes[index].process_name);
2728 2732
2729 ListValue* proc_list = new ListValue(); 2733 ListValue* proc_list = new ListValue();
2730 for (ProcessMemoryInformationList::const_iterator iterator = 2734 for (ProcessMemoryInformationList::const_iterator iterator =
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
3053 } 3057 }
3054 3058
3055 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); 3059 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr();
3056 if (host->extension_id() == extension_id_ && 3060 if (host->extension_id() == extension_id_ &&
3057 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { 3061 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) {
3058 AutomationJSONReply(automation_, reply_message_.release()) 3062 AutomationJSONReply(automation_, reply_message_.release())
3059 .SendSuccess(NULL); 3063 .SendSuccess(NULL);
3060 delete this; 3064 delete this;
3061 } 3065 }
3062 } 3066 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/system/syslogs_provider.cc » ('j') | chrome/browser/oom_priority_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698