| OLD | NEW |
| 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
| 6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
| 7 | 7 |
| 8 #include "content/browser/renderer_host/browser_render_process_host.h" | 8 #include "content/browser/renderer_host/browser_render_process_host.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 // PLATFORM_FILE_TEMPORARY, PLATFORM_FILE_HIDDEN and | 202 // PLATFORM_FILE_TEMPORARY, PLATFORM_FILE_HIDDEN and |
| 203 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API | 203 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API |
| 204 // requests them. | 204 // requests them. |
| 205 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( | 205 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( |
| 206 id(), profile->GetPath().Append( | 206 id(), profile->GetPath().Append( |
| 207 fileapi::SandboxMountPointProvider::kFileSystemDirectory), | 207 fileapi::SandboxMountPointProvider::kFileSystemDirectory), |
| 208 base::PLATFORM_FILE_OPEN | | 208 base::PLATFORM_FILE_OPEN | |
| 209 base::PLATFORM_FILE_CREATE | | 209 base::PLATFORM_FILE_CREATE | |
| 210 base::PLATFORM_FILE_OPEN_ALWAYS | | 210 base::PLATFORM_FILE_OPEN_ALWAYS | |
| 211 base::PLATFORM_FILE_CREATE_ALWAYS | | 211 base::PLATFORM_FILE_CREATE_ALWAYS | |
| 212 base::PLATFORM_FILE_OPEN_TRUNCATED | |
| 212 base::PLATFORM_FILE_READ | | 213 base::PLATFORM_FILE_READ | |
| 213 base::PLATFORM_FILE_WRITE | | 214 base::PLATFORM_FILE_WRITE | |
| 214 base::PLATFORM_FILE_EXCLUSIVE_READ | | 215 base::PLATFORM_FILE_EXCLUSIVE_READ | |
| 215 base::PLATFORM_FILE_EXCLUSIVE_WRITE | | 216 base::PLATFORM_FILE_EXCLUSIVE_WRITE | |
| 216 base::PLATFORM_FILE_ASYNC | | 217 base::PLATFORM_FILE_ASYNC | |
| 217 base::PLATFORM_FILE_TRUNCATE | | |
| 218 base::PLATFORM_FILE_WRITE_ATTRIBUTES); | 218 base::PLATFORM_FILE_WRITE_ATTRIBUTES); |
| 219 | 219 |
| 220 // Note: When we create the BrowserRenderProcessHost, it's technically | 220 // Note: When we create the BrowserRenderProcessHost, it's technically |
| 221 // backgrounded, because it has no visible listeners. But the process | 221 // backgrounded, because it has no visible listeners. But the process |
| 222 // doesn't actually exist yet, so we'll Background it later, after | 222 // doesn't actually exist yet, so we'll Background it later, after |
| 223 // creation. | 223 // creation. |
| 224 } | 224 } |
| 225 | 225 |
| 226 BrowserRenderProcessHost::~BrowserRenderProcessHost() { | 226 BrowserRenderProcessHost::~BrowserRenderProcessHost() { |
| 227 VLOG_IF(1, g_log_bug53991) << "~BrowserRenderProcessHost: " << this; | 227 VLOG_IF(1, g_log_bug53991) << "~BrowserRenderProcessHost: " << this; |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 while (!queued_messages_.empty()) { | 960 while (!queued_messages_.empty()) { |
| 961 Send(queued_messages_.front()); | 961 Send(queued_messages_.front()); |
| 962 queued_messages_.pop(); | 962 queued_messages_.pop(); |
| 963 } | 963 } |
| 964 } | 964 } |
| 965 | 965 |
| 966 void BrowserRenderProcessHost::OnUserMetricsRecordAction( | 966 void BrowserRenderProcessHost::OnUserMetricsRecordAction( |
| 967 const std::string& action) { | 967 const std::string& action) { |
| 968 UserMetrics::RecordComputedAction(action); | 968 UserMetrics::RecordComputedAction(action); |
| 969 } | 969 } |
| OLD | NEW |