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

Side by Side Diff: extensions/browser/guest_view/extension_options/extension_options_guest.cc

Issue 740813004: Use StopChildProcess instead of base::KillProcess to kill a renderer process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typos Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/guest_view/extension_options/extension_options_gues t.h" 5 #include "extensions/browser/guest_view/extension_options/extension_options_gues t.h"
6 6
7 #include "base/metrics/user_metrics.h" 7 #include "base/metrics/user_metrics.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "components/crx_file/id_util.h" 9 #include "components/crx_file/id_util.h"
10 #include "content/public/browser/navigation_details.h" 10 #include "content/public/browser/navigation_details.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 false)); 229 false));
230 } 230 }
231 return false; 231 return false;
232 } 232 }
233 233
234 void ExtensionOptionsGuest::DidNavigateMainFrame( 234 void ExtensionOptionsGuest::DidNavigateMainFrame(
235 const content::LoadCommittedDetails& details, 235 const content::LoadCommittedDetails& details,
236 const content::FrameNavigateParams& params) { 236 const content::FrameNavigateParams& params) {
237 if (attached() && (params.url.GetOrigin() != options_page_.GetOrigin())) { 237 if (attached() && (params.url.GetOrigin() != options_page_.GetOrigin())) {
238 base::RecordAction(base::UserMetricsAction("BadMessageTerminate_EOG")); 238 base::RecordAction(base::UserMetricsAction("BadMessageTerminate_EOG"));
239 base::KillProcess( 239 web_contents()->GetRenderProcessHost()->FastShutdown(
240 web_contents()->GetRenderProcessHost()->GetHandle(),
241 content::RESULT_CODE_KILLED_BAD_MESSAGE, false /* wait */); 240 content::RESULT_CODE_KILLED_BAD_MESSAGE, false /* wait */);
242 } 241 }
243 } 242 }
244 243
245 bool ExtensionOptionsGuest::OnMessageReceived(const IPC::Message& message) { 244 bool ExtensionOptionsGuest::OnMessageReceived(const IPC::Message& message) {
246 bool handled = true; 245 bool handled = true;
247 IPC_BEGIN_MESSAGE_MAP(ExtensionOptionsGuest, message) 246 IPC_BEGIN_MESSAGE_MAP(ExtensionOptionsGuest, message)
248 IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest) 247 IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest)
249 IPC_MESSAGE_UNHANDLED(handled = false) 248 IPC_MESSAGE_UNHANDLED(handled = false)
250 IPC_END_MESSAGE_MAP() 249 IPC_END_MESSAGE_MAP()
(...skipping 25 matching lines...) Expand all
276 attach_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width); 275 attach_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width);
277 276
278 // Call SetAutoSize to apply all the appropriate validation and clipping of 277 // Call SetAutoSize to apply all the appropriate validation and clipping of
279 // values. 278 // values.
280 SetAutoSize(auto_size_enabled, 279 SetAutoSize(auto_size_enabled,
281 gfx::Size(min_width, min_height), 280 gfx::Size(min_width, min_height),
282 gfx::Size(max_width, max_height)); 281 gfx::Size(max_width, max_height));
283 } 282 }
284 283
285 } // namespace extensions 284 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698