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

Side by Side Diff: chrome/renderer/extensions/chrome_extensions_renderer_client.cc

Issue 2421383003: Add operator==(const GURL&, const StringPiece&) to gurl.h (Closed)
Patch Set: remove comment Created 4 years, 2 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
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 "chrome/renderer/extensions/chrome_extensions_renderer_client.h" 5 #include "chrome/renderer/extensions/chrome_extensions_renderer_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 return true; 280 return true;
281 } 281 }
282 282
283 // If this is a reload, check whether it has the wrong process type. We 283 // If this is a reload, check whether it has the wrong process type. We
284 // should send it to the browser if it's an extension URL (e.g., hosted app) 284 // should send it to the browser if it's an extension URL (e.g., hosted app)
285 // in a normal process, or if it's a process for an extension that has been 285 // in a normal process, or if it's a process for an extension that has been
286 // uninstalled. Without --site-per-process mode, we never fork processes for 286 // uninstalled. Without --site-per-process mode, we never fork processes for
287 // subframes, so this check only makes sense for top-level frames. 287 // subframes, so this check only makes sense for top-level frames.
288 // TODO(alexmos,nasko): Figure out how this check should work when reloading 288 // TODO(alexmos,nasko): Figure out how this check should work when reloading
289 // subframes in --site-per-process mode. 289 // subframes in --site-per-process mode.
290 if (!frame->parent() && frame->document().url() == url) { 290 if (!frame->parent() && GURL(frame->document().url()) == url) {
291 if (is_extension_url != IsStandaloneExtensionProcess()) 291 if (is_extension_url != IsStandaloneExtensionProcess())
292 return true; 292 return true;
293 } 293 }
294 return false; 294 return false;
295 } 295 }
296 296
297 // static 297 // static
298 content::BrowserPluginDelegate* 298 content::BrowserPluginDelegate*
299 ChromeExtensionsRendererClient::CreateBrowserPluginDelegate( 299 ChromeExtensionsRendererClient::CreateBrowserPluginDelegate(
300 content::RenderFrame* render_frame, 300 content::RenderFrame* render_frame,
301 const std::string& mime_type, 301 const std::string& mime_type,
302 const GURL& original_url) { 302 const GURL& original_url) {
303 if (mime_type == content::kBrowserPluginMimeType) 303 if (mime_type == content::kBrowserPluginMimeType)
304 return new extensions::ExtensionsGuestViewContainer(render_frame); 304 return new extensions::ExtensionsGuestViewContainer(render_frame);
305 return new extensions::MimeHandlerViewContainer(render_frame, mime_type, 305 return new extensions::MimeHandlerViewContainer(render_frame, mime_type,
306 original_url); 306 original_url);
307 } 307 }
308 308
309 void ChromeExtensionsRendererClient::RunScriptsAtDocumentStart( 309 void ChromeExtensionsRendererClient::RunScriptsAtDocumentStart(
310 content::RenderFrame* render_frame) { 310 content::RenderFrame* render_frame) {
311 extension_dispatcher_->RunScriptsAtDocumentStart(render_frame); 311 extension_dispatcher_->RunScriptsAtDocumentStart(render_frame);
312 } 312 }
313 313
314 void ChromeExtensionsRendererClient::RunScriptsAtDocumentEnd( 314 void ChromeExtensionsRendererClient::RunScriptsAtDocumentEnd(
315 content::RenderFrame* render_frame) { 315 content::RenderFrame* render_frame) {
316 extension_dispatcher_->RunScriptsAtDocumentEnd(render_frame); 316 extension_dispatcher_->RunScriptsAtDocumentEnd(render_frame);
317 } 317 }
OLDNEW
« no previous file with comments | « chrome/renderer/autofill/form_autofill_browsertest.cc ('k') | components/domain_reliability/monitor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698