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

Side by Side Diff: chrome/browser/automation/automation_provider_observers.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
« no previous file with comments | « no previous file | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 68 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
69 #include "chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.h" 69 #include "chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.h"
70 #include "chrome/common/automation_messages.h" 70 #include "chrome/common/automation_messages.h"
71 #include "chrome/common/chrome_notification_types.h" 71 #include "chrome/common/chrome_notification_types.h"
72 #include "chrome/common/content_settings_types.h" 72 #include "chrome/common/content_settings_types.h"
73 #include "chrome/common/extensions/extension.h" 73 #include "chrome/common/extensions/extension.h"
74 #include "content/browser/download/save_package.h" 74 #include "content/browser/download/save_package.h"
75 #include "content/browser/renderer_host/render_view_host.h" 75 #include "content/browser/renderer_host/render_view_host.h"
76 #include "content/browser/tab_contents/navigation_controller.h" 76 #include "content/browser/tab_contents/navigation_controller.h"
77 #include "content/browser/tab_contents/tab_contents.h" 77 #include "content/browser/tab_contents/tab_contents.h"
78 #include "content/common/child_process_info.h"
79 #include "content/public/browser/notification_service.h" 78 #include "content/public/browser/notification_service.h"
80 #include "content/public/browser/render_process_host.h" 79 #include "content/public/browser/render_process_host.h"
81 #include "content/public/common/process_type.h" 80 #include "content/public/common/process_type.h"
82 #include "googleurl/src/gurl.h" 81 #include "googleurl/src/gurl.h"
83 #include "third_party/skia/include/core/SkBitmap.h" 82 #include "third_party/skia/include/core/SkBitmap.h"
84 #include "ui/gfx/codec/png_codec.h" 83 #include "ui/gfx/codec/png_codec.h"
85 #include "ui/gfx/rect.h" 84 #include "ui/gfx/rect.h"
86 85
87 using content::BrowserThread; 86 using content::BrowserThread;
88 87
(...skipping 2772 matching lines...) Expand 10 before | Expand all | Expand 10 after
2861 proc_data->SetString("version", iterator->version); 2860 proc_data->SetString("version", iterator->version);
2862 proc_data->SetString("product_name", iterator->product_name); 2861 proc_data->SetString("product_name", iterator->product_name);
2863 proc_data->SetInteger("num_processes", iterator->num_processes); 2862 proc_data->SetInteger("num_processes", iterator->num_processes);
2864 proc_data->SetBoolean("is_diagnostics", iterator->is_diagnostics); 2863 proc_data->SetBoolean("is_diagnostics", iterator->is_diagnostics);
2865 2864
2866 // Process type, if this is a child process of Chrome (e.g., 'plugin'). 2865 // Process type, if this is a child process of Chrome (e.g., 'plugin').
2867 std::string process_type = "Unknown"; 2866 std::string process_type = "Unknown";
2868 // The following condition avoids a DCHECK in debug builds when the 2867 // The following condition avoids a DCHECK in debug builds when the
2869 // process type passed to |GetTypeNameInEnglish| is unknown. 2868 // process type passed to |GetTypeNameInEnglish| is unknown.
2870 if (iterator->type != content::PROCESS_TYPE_UNKNOWN) 2869 if (iterator->type != content::PROCESS_TYPE_UNKNOWN)
2871 process_type = ChildProcessInfo::GetTypeNameInEnglish(iterator->type); 2870 process_type = content::GetProcessTypeNameInEnglish(iterator->type);
2872 proc_data->SetString("child_process_type", process_type); 2871 proc_data->SetString("child_process_type", process_type);
2873 2872
2874 // Renderer type, if this is a renderer process. 2873 // Renderer type, if this is a renderer process.
2875 std::string renderer_type = "Unknown"; 2874 std::string renderer_type = "Unknown";
2876 if (iterator->renderer_type != 2875 if (iterator->renderer_type !=
2877 ProcessMemoryInformation::RENDERER_UNKNOWN) { 2876 ProcessMemoryInformation::RENDERER_UNKNOWN) {
2878 renderer_type = ProcessMemoryInformation::GetRendererTypeNameInEnglish( 2877 renderer_type = ProcessMemoryInformation::GetRendererTypeNameInEnglish(
2879 iterator->renderer_type); 2878 iterator->renderer_type);
2880 } 2879 }
2881 proc_data->SetString("renderer_type", renderer_type); 2880 proc_data->SetString("renderer_type", renderer_type);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
2954 if (automation_) { 2953 if (automation_) {
2955 AutomationJSONReply(automation_, reply_message_.release()) 2954 AutomationJSONReply(automation_, reply_message_.release())
2956 .SendSuccess(NULL); 2955 .SendSuccess(NULL);
2957 } 2956 }
2958 delete this; 2957 delete this;
2959 } 2958 }
2960 } else { 2959 } else {
2961 NOTREACHED(); 2960 NOTREACHED();
2962 } 2961 }
2963 } 2962 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698