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

Side by Side Diff: content/browser/frame_host/frame_tree.cc

Issue 2424913003: Avoid unnecessary URL parsing for GURL comparisons in //content (Closed)
Patch Set: rebase on dependent PS 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
« no previous file with comments | « content/browser/frame_host/debug_urls.cc ('k') | content/browser/frame_host/frame_tree_node.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/frame_host/frame_tree.h" 5 #include "content/browser/frame_host/frame_tree.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <queue> 9 #include <queue>
10 #include <utility> 10 #include <utility>
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 continue; 411 continue;
412 progress += node->loading_progress(); 412 progress += node->loading_progress();
413 frame_count++; 413 frame_count++;
414 } 414 }
415 break; 415 break;
416 case ProgressBarCompletion::RESOURCES_BEFORE_DCL_AND_SAME_ORIGIN_IFRAMES: 416 case ProgressBarCompletion::RESOURCES_BEFORE_DCL_AND_SAME_ORIGIN_IFRAMES:
417 for (FrameTreeNode* node : Nodes()) { 417 for (FrameTreeNode* node : Nodes()) {
418 // Ignore the current frame if it has not started loading, 418 // Ignore the current frame if it has not started loading,
419 // if the frame is cross-origin, or about:blank. 419 // if the frame is cross-origin, or about:blank.
420 if (!node->has_started_loading() || !node->HasSameOrigin(*root_) || 420 if (!node->has_started_loading() || !node->HasSameOrigin(*root_) ||
421 node->current_url() == GURL(url::kAboutBlankURL)) 421 node->current_url() == url::kAboutBlankURL)
422 continue; 422 continue;
423 progress += node->loading_progress(); 423 progress += node->loading_progress();
424 frame_count++; 424 frame_count++;
425 } 425 }
426 break; 426 break;
427 default: 427 default:
428 NOTREACHED(); 428 NOTREACHED();
429 } 429 }
430 430
431 if (frame_count != 0) 431 if (frame_count != 0)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 // This is only used to set page-level focus in cross-process subframes, and 472 // This is only used to set page-level focus in cross-process subframes, and
473 // requests to set focus in main frame's SiteInstance are ignored. 473 // requests to set focus in main frame's SiteInstance are ignored.
474 if (instance != root_manager->current_frame_host()->GetSiteInstance()) { 474 if (instance != root_manager->current_frame_host()->GetSiteInstance()) {
475 RenderFrameProxyHost* proxy = 475 RenderFrameProxyHost* proxy =
476 root_manager->GetRenderFrameProxyHost(instance); 476 root_manager->GetRenderFrameProxyHost(instance);
477 proxy->Send(new InputMsg_SetFocus(proxy->GetRoutingID(), is_focused)); 477 proxy->Send(new InputMsg_SetFocus(proxy->GetRoutingID(), is_focused));
478 } 478 }
479 } 479 }
480 480
481 } // namespace content 481 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/debug_urls.cc ('k') | content/browser/frame_host/frame_tree_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698