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

Side by Side Diff: chrome/browser/extensions/extension_save_page_api.cc

Issue 8515027: Define the public version of the browser side RenderProcessHost interface. This interface is not ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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/extensions/extension_save_page_api.h" 5 #include "chrome/browser/extensions/extension_save_page_api.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/extensions/extension_tab_util.h" 9 #include "chrome/browser/extensions/extension_tab_util.h"
10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 error_ = error; 117 error_ = error;
118 118
119 SendResponse(false); 119 SendResponse(false);
120 120
121 Release(); // Balanced in Run() 121 Release(); // Balanced in Run()
122 } 122 }
123 123
124 void SavePageAsMHTMLFunction::ReturnSuccess(int64 file_size) { 124 void SavePageAsMHTMLFunction::ReturnSuccess(int64 file_size) {
125 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 125 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
126 126
127 int child_id = render_view_host()->process()->id(); 127 int child_id = render_view_host()->process()->GetID();
128 ChildProcessSecurityPolicy::GetInstance()->GrantReadFile( 128 ChildProcessSecurityPolicy::GetInstance()->GrantReadFile(
129 child_id, mhtml_path_); 129 child_id, mhtml_path_);
130 130
131 DictionaryValue* dict = new DictionaryValue(); 131 DictionaryValue* dict = new DictionaryValue();
132 result_.reset(dict); 132 result_.reset(dict);
133 dict->SetString("mhtmlFilePath", mhtml_path_.value()); 133 dict->SetString("mhtmlFilePath", mhtml_path_.value());
134 dict->SetInteger("mhtmlFileLength", file_size); 134 dict->SetInteger("mhtmlFileLength", file_size);
135 135
136 SendResponse(true); 136 SendResponse(true);
137 137
138 Release(); // Balanced in Run() 138 Release(); // Balanced in Run()
139 } 139 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_processes_api.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698