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

Side by Side Diff: content/browser/renderer_host/browser_render_process_host.cc

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: browser_context Created 9 years, 5 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) 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>
11 #include <limits> 11 #include <limits>
12 #include <vector> 12 #include <vector>
13 13
14 #if defined(OS_POSIX) 14 #if defined(OS_POSIX)
15 #include <utility> // for pair<> 15 #include <utility> // for pair<>
16 #endif 16 #endif
17 17
18 #include "base/callback.h" 18 #include "base/callback.h"
19 #include "base/command_line.h" 19 #include "base/command_line.h"
20 #include "base/logging.h" 20 #include "base/logging.h"
21 #include "base/metrics/field_trial.h" 21 #include "base/metrics/field_trial.h"
22 #include "base/metrics/histogram.h" 22 #include "base/metrics/histogram.h"
23 #include "base/path_service.h" 23 #include "base/path_service.h"
24 #include "base/platform_file.h" 24 #include "base/platform_file.h"
25 #include "base/stl_util.h" 25 #include "base/stl_util.h"
26 #include "base/string_util.h" 26 #include "base/string_util.h"
27 #include "base/threading/thread.h" 27 #include "base/threading/thread.h"
28 #include "base/threading/thread_restrictions.h" 28 #include "base/threading/thread_restrictions.h"
29 #include "chrome/browser/profiles/profile.h"
30 #include "content/browser/appcache/appcache_dispatcher_host.h" 29 #include "content/browser/appcache/appcache_dispatcher_host.h"
31 #include "content/browser/browser_child_process_host.h" 30 #include "content/browser/browser_child_process_host.h"
31 #include "content/browser/browser_context.h"
32 #include "content/browser/child_process_security_policy.h" 32 #include "content/browser/child_process_security_policy.h"
33 #include "content/browser/content_browser_client.h" 33 #include "content/browser/content_browser_client.h"
34 #include "content/browser/device_orientation/message_filter.h" 34 #include "content/browser/device_orientation/message_filter.h"
35 #include "content/browser/download/mhtml_generation_manager.h" 35 #include "content/browser/download/mhtml_generation_manager.h"
36 #include "content/browser/file_system/file_system_dispatcher_host.h" 36 #include "content/browser/file_system/file_system_dispatcher_host.h"
37 #include "content/browser/geolocation/geolocation_dispatcher_host.h" 37 #include "content/browser/geolocation/geolocation_dispatcher_host.h"
38 #include "content/browser/gpu/gpu_data_manager.h" 38 #include "content/browser/gpu/gpu_data_manager.h"
39 #include "content/browser/gpu/gpu_process_host.h" 39 #include "content/browser/gpu/gpu_process_host.h"
40 #include "content/browser/in_process_webkit/dom_storage_message_filter.h" 40 #include "content/browser/in_process_webkit/dom_storage_message_filter.h"
41 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" 41 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 RenderProcess* render_process_; 144 RenderProcess* render_process_;
145 }; 145 };
146 146
147 namespace { 147 namespace {
148 148
149 // Helper class that we pass to ResourceMessageFilter so that it can find the 149 // Helper class that we pass to ResourceMessageFilter so that it can find the
150 // right net::URLRequestContext for a request. 150 // right net::URLRequestContext for a request.
151 class RendererURLRequestContextSelector 151 class RendererURLRequestContextSelector
152 : public ResourceMessageFilter::URLRequestContextSelector { 152 : public ResourceMessageFilter::URLRequestContextSelector {
153 public: 153 public:
154 RendererURLRequestContextSelector(Profile* profile, 154 RendererURLRequestContextSelector(content::BrowserContext* context,
155 int render_child_id) 155 int render_child_id)
156 : request_context_(profile->GetRequestContextForRenderProcess( 156 : request_context_(context->GetRequestContextForRenderProcess(
157 render_child_id)), 157 render_child_id)),
158 media_request_context_(profile->GetRequestContextForMedia()) { 158 media_request_context_(context->GetRequestContextForMedia()) {
159 } 159 }
160 160
161 virtual net::URLRequestContext* GetRequestContext( 161 virtual net::URLRequestContext* GetRequestContext(
162 ResourceType::Type resource_type) { 162 ResourceType::Type resource_type) {
163 net::URLRequestContextGetter* request_context = request_context_; 163 net::URLRequestContextGetter* request_context = request_context_;
164 // If the request has resource type of ResourceType::MEDIA, we use a request 164 // If the request has resource type of ResourceType::MEDIA, we use a request
165 // context specific to media for handling it because these resources have 165 // context specific to media for handling it because these resources have
166 // specific needs for caching. 166 // specific needs for caching.
167 if (resource_type == ResourceType::MEDIA) 167 if (resource_type == ResourceType::MEDIA)
168 request_context = media_request_context_; 168 request_context = media_request_context_;
169 return request_context->GetURLRequestContext(); 169 return request_context->GetURLRequestContext();
170 } 170 }
171 171
172 private: 172 private:
173 virtual ~RendererURLRequestContextSelector() {} 173 virtual ~RendererURLRequestContextSelector() {}
174 174
175 scoped_refptr<net::URLRequestContextGetter> request_context_; 175 scoped_refptr<net::URLRequestContextGetter> request_context_;
176 scoped_refptr<net::URLRequestContextGetter> media_request_context_; 176 scoped_refptr<net::URLRequestContextGetter> media_request_context_;
177 }; 177 };
178 178
179 } // namespace 179 } // namespace
180 180
181 BrowserRenderProcessHost::BrowserRenderProcessHost(Profile* profile) 181 BrowserRenderProcessHost::BrowserRenderProcessHost(
182 : RenderProcessHost(profile), 182 content::BrowserContext* context)
183 visible_widgets_(0), 183 : RenderProcessHost(context),
184 backgrounded_(true), 184 visible_widgets_(0),
185 ALLOW_THIS_IN_INITIALIZER_LIST(cached_dibs_cleaner_( 185 backgrounded_(true),
186 base::TimeDelta::FromSeconds(5), 186 ALLOW_THIS_IN_INITIALIZER_LIST(cached_dibs_cleaner_(
187 this, &BrowserRenderProcessHost::ClearTransportDIBCache)), 187 base::TimeDelta::FromSeconds(5),
188 accessibility_enabled_(false), 188 this, &BrowserRenderProcessHost::ClearTransportDIBCache)),
189 is_initialized_(false) { 189 accessibility_enabled_(false),
190 is_initialized_(false) {
190 widget_helper_ = new RenderWidgetHelper(); 191 widget_helper_ = new RenderWidgetHelper();
191 192
192 ChildProcessSecurityPolicy::GetInstance()->Add(id()); 193 ChildProcessSecurityPolicy::GetInstance()->Add(id());
193 194
194 // Grant most file permissions to this renderer. 195 // Grant most file permissions to this renderer.
195 // PLATFORM_FILE_TEMPORARY, PLATFORM_FILE_HIDDEN and 196 // PLATFORM_FILE_TEMPORARY, PLATFORM_FILE_HIDDEN and
196 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API 197 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API
197 // requests them. 198 // requests them.
198 // This is for the filesystem sandbox. 199 // This is for the filesystem sandbox.
199 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( 200 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile(
200 id(), profile->GetPath().Append( 201 id(), context->GetPath().Append(
201 fileapi::SandboxMountPointProvider::kNewFileSystemDirectory), 202 fileapi::SandboxMountPointProvider::kNewFileSystemDirectory),
202 base::PLATFORM_FILE_OPEN | 203 base::PLATFORM_FILE_OPEN |
203 base::PLATFORM_FILE_CREATE | 204 base::PLATFORM_FILE_CREATE |
204 base::PLATFORM_FILE_OPEN_ALWAYS | 205 base::PLATFORM_FILE_OPEN_ALWAYS |
205 base::PLATFORM_FILE_CREATE_ALWAYS | 206 base::PLATFORM_FILE_CREATE_ALWAYS |
206 base::PLATFORM_FILE_OPEN_TRUNCATED | 207 base::PLATFORM_FILE_OPEN_TRUNCATED |
207 base::PLATFORM_FILE_READ | 208 base::PLATFORM_FILE_READ |
208 base::PLATFORM_FILE_WRITE | 209 base::PLATFORM_FILE_WRITE |
209 base::PLATFORM_FILE_EXCLUSIVE_READ | 210 base::PLATFORM_FILE_EXCLUSIVE_READ |
210 base::PLATFORM_FILE_EXCLUSIVE_WRITE | 211 base::PLATFORM_FILE_EXCLUSIVE_WRITE |
211 base::PLATFORM_FILE_ASYNC | 212 base::PLATFORM_FILE_ASYNC |
212 base::PLATFORM_FILE_WRITE_ATTRIBUTES | 213 base::PLATFORM_FILE_WRITE_ATTRIBUTES |
213 base::PLATFORM_FILE_ENUMERATE); 214 base::PLATFORM_FILE_ENUMERATE);
214 // This is so that we can read and move stuff out of the old filesystem 215 // This is so that we can read and move stuff out of the old filesystem
215 // sandbox. 216 // sandbox.
216 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( 217 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile(
217 id(), profile->GetPath().Append( 218 id(), context->GetPath().Append(
218 fileapi::SandboxMountPointProvider::kOldFileSystemDirectory), 219 fileapi::SandboxMountPointProvider::kOldFileSystemDirectory),
219 base::PLATFORM_FILE_READ | base::PLATFORM_FILE_WRITE | 220 base::PLATFORM_FILE_READ | base::PLATFORM_FILE_WRITE |
220 base::PLATFORM_FILE_WRITE_ATTRIBUTES | base::PLATFORM_FILE_ENUMERATE); 221 base::PLATFORM_FILE_WRITE_ATTRIBUTES | base::PLATFORM_FILE_ENUMERATE);
221 // This is so that we can rename the old sandbox out of the way so that we 222 // This is so that we can rename the old sandbox out of the way so that we
222 // know we've taken care of it. 223 // know we've taken care of it.
223 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( 224 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile(
224 id(), profile->GetPath().Append( 225 id(), context->GetPath().Append(
225 fileapi::SandboxMountPointProvider::kRenamedOldFileSystemDirectory), 226 fileapi::SandboxMountPointProvider::kRenamedOldFileSystemDirectory),
226 base::PLATFORM_FILE_CREATE | base::PLATFORM_FILE_CREATE_ALWAYS | 227 base::PLATFORM_FILE_CREATE | base::PLATFORM_FILE_CREATE_ALWAYS |
227 base::PLATFORM_FILE_WRITE); 228 base::PLATFORM_FILE_WRITE);
228 229
229 // Note: When we create the BrowserRenderProcessHost, it's technically 230 // Note: When we create the BrowserRenderProcessHost, it's technically
230 // backgrounded, because it has no visible listeners. But the process 231 // backgrounded, because it has no visible listeners. But the process
231 // doesn't actually exist yet, so we'll Background it later, after 232 // doesn't actually exist yet, so we'll Background it later, after
232 // creation. 233 // creation.
233 } 234 }
234 235
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 337
337 is_initialized_ = true; 338 is_initialized_ = true;
338 return true; 339 return true;
339 } 340 }
340 341
341 void BrowserRenderProcessHost::CreateMessageFilters() { 342 void BrowserRenderProcessHost::CreateMessageFilters() {
342 scoped_refptr<RenderMessageFilter> render_message_filter( 343 scoped_refptr<RenderMessageFilter> render_message_filter(
343 new RenderMessageFilter( 344 new RenderMessageFilter(
344 id(), 345 id(),
345 PluginService::GetInstance(), 346 PluginService::GetInstance(),
346 profile(), 347 context(),
347 profile()->GetRequestContextForRenderProcess(id()), 348 context()->GetRequestContextForRenderProcess(id()),
348 widget_helper_)); 349 widget_helper_));
349 channel_->AddFilter(render_message_filter); 350 channel_->AddFilter(render_message_filter);
350 351
351 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter( 352 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter(
352 id(), ChildProcessInfo::RENDER_PROCESS, 353 id(), ChildProcessInfo::RENDER_PROCESS,
353 &profile()->GetResourceContext(), 354 &context()->GetResourceContext(),
354 new RendererURLRequestContextSelector(profile(), id()), 355 new RendererURLRequestContextSelector(context(), id()),
355 content::GetContentClient()->browser()->GetResourceDispatcherHost()); 356 content::GetContentClient()->browser()->GetResourceDispatcherHost());
356 357
357 channel_->AddFilter(resource_message_filter); 358 channel_->AddFilter(resource_message_filter);
358 channel_->AddFilter(new AudioInputRendererHost()); 359 channel_->AddFilter(new AudioInputRendererHost());
359 channel_->AddFilter(new AudioRendererHost(&profile()->GetResourceContext())); 360 channel_->AddFilter(new AudioRendererHost(&context()->GetResourceContext()));
360 channel_->AddFilter(new VideoCaptureHost()); 361 channel_->AddFilter(new VideoCaptureHost());
361 channel_->AddFilter( 362 channel_->AddFilter(
362 new AppCacheDispatcherHost(&profile()->GetResourceContext(), id())); 363 new AppCacheDispatcherHost(&context()->GetResourceContext(), id()));
363 channel_->AddFilter(new ClipboardMessageFilter()); 364 channel_->AddFilter(new ClipboardMessageFilter());
364 channel_->AddFilter( 365 channel_->AddFilter(
365 new DOMStorageMessageFilter(id(), profile()->GetWebKitContext())); 366 new DOMStorageMessageFilter(id(), context()->GetWebKitContext()));
366 channel_->AddFilter( 367 channel_->AddFilter(
367 new IndexedDBDispatcherHost(id(), profile()->GetWebKitContext())); 368 new IndexedDBDispatcherHost(id(), context()->GetWebKitContext()));
368 channel_->AddFilter( 369 channel_->AddFilter(
369 GeolocationDispatcherHost::New( 370 GeolocationDispatcherHost::New(
370 id(), profile()->GetGeolocationPermissionContext())); 371 id(), context()->GetGeolocationPermissionContext()));
371 channel_->AddFilter(new GpuMessageFilter(id(), widget_helper_.get())); 372 channel_->AddFilter(new GpuMessageFilter(id(), widget_helper_.get()));
372 channel_->AddFilter(new media_stream::MediaStreamDispatcherHost(id())); 373 channel_->AddFilter(new media_stream::MediaStreamDispatcherHost(id()));
373 channel_->AddFilter(new PepperFileMessageFilter(id(), profile())); 374 channel_->AddFilter(new PepperFileMessageFilter(id(), context()));
374 channel_->AddFilter( 375 channel_->AddFilter(
375 new PepperMessageFilter(&profile()->GetResourceContext())); 376 new PepperMessageFilter(&context()->GetResourceContext()));
376 channel_->AddFilter(new speech_input::SpeechInputDispatcherHost(id())); 377 channel_->AddFilter(new speech_input::SpeechInputDispatcherHost(id()));
377 channel_->AddFilter( 378 channel_->AddFilter(
378 new FileSystemDispatcherHost(&profile()->GetResourceContext())); 379 new FileSystemDispatcherHost(&context()->GetResourceContext()));
379 channel_->AddFilter(new device_orientation::MessageFilter()); 380 channel_->AddFilter(new device_orientation::MessageFilter());
380 channel_->AddFilter( 381 channel_->AddFilter(
381 new BlobMessageFilter(id(), profile()->GetBlobStorageContext())); 382 new BlobMessageFilter(id(), context()->GetBlobStorageContext()));
382 channel_->AddFilter(new FileUtilitiesMessageFilter(id())); 383 channel_->AddFilter(new FileUtilitiesMessageFilter(id()));
383 channel_->AddFilter(new MimeRegistryMessageFilter()); 384 channel_->AddFilter(new MimeRegistryMessageFilter());
384 channel_->AddFilter(new DatabaseMessageFilter( 385 channel_->AddFilter(new DatabaseMessageFilter(
385 profile()->GetDatabaseTracker())); 386 context()->GetDatabaseTracker()));
386 387
387 SocketStreamDispatcherHost* socket_stream_dispatcher_host = 388 SocketStreamDispatcherHost* socket_stream_dispatcher_host =
388 new SocketStreamDispatcherHost( 389 new SocketStreamDispatcherHost(
389 new RendererURLRequestContextSelector(profile(), id()), 390 new RendererURLRequestContextSelector(context(), id()),
390 &profile()->GetResourceContext()); 391 &context()->GetResourceContext());
391 channel_->AddFilter(socket_stream_dispatcher_host); 392 channel_->AddFilter(socket_stream_dispatcher_host);
392 393
393 channel_->AddFilter( 394 channel_->AddFilter(
394 new WorkerMessageFilter( 395 new WorkerMessageFilter(
395 id(), 396 id(),
396 &profile()->GetResourceContext(), 397 &context()->GetResourceContext(),
397 content::GetContentClient()->browser()->GetResourceDispatcherHost(), 398 content::GetContentClient()->browser()->GetResourceDispatcherHost(),
398 NewCallbackWithReturnValue( 399 NewCallbackWithReturnValue(
399 widget_helper_.get(), &RenderWidgetHelper::GetNextRoutingID))); 400 widget_helper_.get(), &RenderWidgetHelper::GetNextRoutingID)));
400 401
401 #if defined(ENABLE_P2P_APIS) 402 #if defined(ENABLE_P2P_APIS)
402 channel_->AddFilter(new P2PSocketDispatcherHost()); 403 channel_->AddFilter(new P2PSocketDispatcherHost());
403 #endif 404 #endif
404 405
405 channel_->AddFilter(new TraceMessageFilter()); 406 channel_->AddFilter(new TraceMessageFilter());
406 channel_->AddFilter(new ResolveProxyMsgHelper(NULL)); 407 channel_->AddFilter(new ResolveProxyMsgHelper(NULL));
407 channel_->AddFilter(new QuotaDispatcherHost( 408 channel_->AddFilter(new QuotaDispatcherHost(
408 id(), profile()->GetQuotaManager(), 409 id(), context()->GetQuotaManager(),
409 content::GetContentClient()->browser()->CreateQuotaPermissionContext())); 410 content::GetContentClient()->browser()->CreateQuotaPermissionContext()));
410 } 411 }
411 412
412 int BrowserRenderProcessHost::GetNextRoutingID() { 413 int BrowserRenderProcessHost::GetNextRoutingID() {
413 return widget_helper_->GetNextRoutingID(); 414 return widget_helper_->GetNextRoutingID();
414 } 415 }
415 416
416 void BrowserRenderProcessHost::CancelResourceRequests(int render_widget_id) { 417 void BrowserRenderProcessHost::CancelResourceRequests(int render_widget_id) {
417 widget_helper_->CancelResourceRequests(render_widget_id); 418 widget_helper_->CancelResourceRequests(render_widget_id);
418 } 419 }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 switches::kUserAgent, 592 switches::kUserAgent,
592 switches::kV, 593 switches::kV,
593 switches::kVideoThreads, 594 switches::kVideoThreads,
594 switches::kVModule, 595 switches::kVModule,
595 switches::kWebCoreLogChannels, 596 switches::kWebCoreLogChannels,
596 }; 597 };
597 renderer_cmd->CopySwitchesFrom(browser_cmd, kSwitchNames, 598 renderer_cmd->CopySwitchesFrom(browser_cmd, kSwitchNames,
598 arraysize(kSwitchNames)); 599 arraysize(kSwitchNames));
599 600
600 // Disable databases in incognito mode. 601 // Disable databases in incognito mode.
601 if (profile()->IsOffTheRecord() && 602 if (context()->IsOffTheRecord() &&
602 !browser_cmd.HasSwitch(switches::kDisableDatabases)) { 603 !browser_cmd.HasSwitch(switches::kDisableDatabases)) {
603 renderer_cmd->AppendSwitch(switches::kDisableDatabases); 604 renderer_cmd->AppendSwitch(switches::kDisableDatabases);
604 } 605 }
605 } 606 }
606 607
607 base::ProcessHandle BrowserRenderProcessHost::GetHandle() { 608 base::ProcessHandle BrowserRenderProcessHost::GetHandle() {
608 // child_process_launcher_ is null either because we're in single process 609 // child_process_launcher_ is null either because we're in single process
609 // mode, we have done fast termination, or the process has crashed. 610 // mode, we have done fast termination, or the process has crashed.
610 if (run_renderer_in_process() || !child_process_launcher_.get()) 611 if (run_renderer_in_process() || !child_process_launcher_.get())
611 return base::Process::Current().handle(); 612 return base::Process::Current().handle();
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 722
722 if (child_process_launcher_.get() && child_process_launcher_->IsStarting()) { 723 if (child_process_launcher_.get() && child_process_launcher_->IsStarting()) {
723 queued_messages_.push(msg); 724 queued_messages_.push(msg);
724 return true; 725 return true;
725 } 726 }
726 727
727 return channel_->Send(msg); 728 return channel_->Send(msg);
728 } 729 }
729 730
730 bool BrowserRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { 731 bool BrowserRenderProcessHost::OnMessageReceived(const IPC::Message& msg) {
731 // If we're about to be deleted, we can no longer trust that our profile is 732 // If we're about to be deleted, we can no longer trust that our context is
732 // valid, so we ignore incoming messages. 733 // valid, so we ignore incoming messages.
733 if (deleting_soon_) 734 if (deleting_soon_)
734 return false; 735 return false;
735 736
736 mark_child_process_activity_time(); 737 mark_child_process_activity_time();
737 if (msg.routing_id() == MSG_ROUTING_CONTROL) { 738 if (msg.routing_id() == MSG_ROUTING_CONTROL) {
738 // Dispatch control messages. 739 // Dispatch control messages.
739 bool msg_is_ok = true; 740 bool msg_is_ok = true;
740 IPC_BEGIN_MESSAGE_MAP_EX(BrowserRenderProcessHost, msg, msg_is_ok) 741 IPC_BEGIN_MESSAGE_MAP_EX(BrowserRenderProcessHost, msg, msg_is_ok)
741 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ShutdownRequest, 742 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ShutdownRequest,
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { 917 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) {
917 // Only honor the request if appropriate persmissions are granted. 918 // Only honor the request if appropriate persmissions are granted.
918 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) 919 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path))
919 content::GetContentClient()->browser()->RevealFolderInOS(path); 920 content::GetContentClient()->browser()->RevealFolderInOS(path);
920 } 921 }
921 922
922 void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, bool success) { 923 void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, bool success) {
923 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> 924 content::GetContentClient()->browser()->GetMHTMLGenerationManager()->
924 MHTMLGenerated(job_id, success); 925 MHTMLGenerated(job_id, success);
925 } 926 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698