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

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

Issue 8757014: Move GetProcessTypeNameInEnglish beside the ProcessType enum where it belongs. This also helps re... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 2714 matching lines...) Expand 10 before | Expand all | Expand 10 after
2725 void GetChildProcessHostInfo(ListValue* child_processes) { 2725 void GetChildProcessHostInfo(ListValue* child_processes) {
2726 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 2726 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
2727 for (BrowserChildProcessHost::Iterator iter; !iter.Done(); ++iter) { 2727 for (BrowserChildProcessHost::Iterator iter; !iter.Done(); ++iter) {
2728 // Only add processes which are already started, 2728 // Only add processes which are already started,
2729 // since we need their handle. 2729 // since we need their handle.
2730 if ((*iter)->handle() == base::kNullProcessHandle) 2730 if ((*iter)->handle() == base::kNullProcessHandle)
2731 continue; 2731 continue;
2732 ChildProcessInfo* info = *iter; 2732 ChildProcessInfo* info = *iter;
2733 DictionaryValue* item = new DictionaryValue; 2733 DictionaryValue* item = new DictionaryValue;
2734 item->SetString("name", info->name()); 2734 item->SetString("name", info->name());
2735 item->SetString("type", 2735 item->SetString("type", content::GetProcessTypeNameInEnglish(info->type()));
2736 ChildProcessInfo::GetTypeNameInEnglish(info->type()));
2737 item->SetInteger("pid", base::GetProcId(info->handle())); 2736 item->SetInteger("pid", base::GetProcId(info->handle()));
2738 child_processes->Append(item); 2737 child_processes->Append(item);
2739 } 2738 }
2740 } 2739 }
2741 2740
2742 } // namespace 2741 } // namespace
2743 2742
2744 // Sample json input: { "command": "GetBrowserInfo" } 2743 // Sample json input: { "command": "GetBrowserInfo" }
2745 // Refer to GetBrowserInfo() in chrome/test/pyautolib/pyauto.py for 2744 // Refer to GetBrowserInfo() in chrome/test/pyautolib/pyauto.py for
2746 // sample json output. 2745 // sample json output.
(...skipping 3683 matching lines...) Expand 10 before | Expand all | Expand 10 after
6430 6429
6431 Send(reply_message_); 6430 Send(reply_message_);
6432 redirect_query_ = 0; 6431 redirect_query_ = 0;
6433 reply_message_ = NULL; 6432 reply_message_ = NULL;
6434 } 6433 }
6435 6434
6436 void TestingAutomationProvider::OnRemoveProvider() { 6435 void TestingAutomationProvider::OnRemoveProvider() {
6437 if (g_browser_process) 6436 if (g_browser_process)
6438 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6437 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6439 } 6438 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.cc ('k') | chrome/browser/memory_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698