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

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

Issue 1294243004: PlzNavigate: Make ServiceWorker work with PlzNavigate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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 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/navigation_entry_impl.h" 5 #include "content/browser/frame_host/navigation_entry_impl.h"
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 // ResetForCommit: intent_received_timestamp_ 434 // ResetForCommit: intent_received_timestamp_
435 copy->extra_data_ = extra_data_; 435 copy->extra_data_ = extra_data_;
436 436
437 return copy.Pass(); 437 return copy.Pass();
438 } 438 }
439 439
440 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams( 440 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams(
441 const GURL& dest_url, 441 const GURL& dest_url,
442 const Referrer& dest_referrer, 442 const Referrer& dest_referrer,
443 const FrameNavigationEntry& frame_entry, 443 const FrameNavigationEntry& frame_entry,
444 FrameMsg_Navigate_Type::Value navigation_type) const { 444 FrameMsg_Navigate_Type::Value navigation_type,
445 int service_worker_provider_id) const {
445 FrameMsg_UILoadMetricsReportType::Value report_type = 446 FrameMsg_UILoadMetricsReportType::Value report_type =
446 FrameMsg_UILoadMetricsReportType::NO_REPORT; 447 FrameMsg_UILoadMetricsReportType::NO_REPORT;
447 base::TimeTicks ui_timestamp = base::TimeTicks(); 448 base::TimeTicks ui_timestamp = base::TimeTicks();
448 #if defined(OS_ANDROID) 449 #if defined(OS_ANDROID)
449 if (!intent_received_timestamp().is_null()) 450 if (!intent_received_timestamp().is_null())
450 report_type = FrameMsg_UILoadMetricsReportType::REPORT_INTENT; 451 report_type = FrameMsg_UILoadMetricsReportType::REPORT_INTENT;
451 ui_timestamp = intent_received_timestamp(); 452 ui_timestamp = intent_received_timestamp();
452 #endif 453 #endif
453 454
454 return CommonNavigationParams( 455 return CommonNavigationParams(
455 dest_url, dest_referrer, GetTransitionType(), navigation_type, 456 dest_url, dest_referrer, GetTransitionType(), navigation_type,
456 !IsViewSourceMode(), should_replace_entry(), ui_timestamp, report_type, 457 !IsViewSourceMode(), should_replace_entry(), ui_timestamp, report_type,
457 GetBaseURLForDataURL(), GetHistoryURLForDataURL()); 458 GetBaseURLForDataURL(), GetHistoryURLForDataURL(),
459 service_worker_provider_id);
458 } 460 }
459 461
460 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() 462 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams()
461 const { 463 const {
462 std::vector<unsigned char> browser_initiated_post_data; 464 std::vector<unsigned char> browser_initiated_post_data;
463 if (GetBrowserInitiatedPostData()) { 465 if (GetBrowserInitiatedPostData()) {
464 browser_initiated_post_data.assign( 466 browser_initiated_post_data.assign(
465 GetBrowserInitiatedPostData()->front(), 467 GetBrowserInitiatedPostData()->front(),
466 GetBrowserInitiatedPostData()->front() + 468 GetBrowserInitiatedPostData()->front() +
467 GetBrowserInitiatedPostData()->size()); 469 GetBrowserInitiatedPostData()->size());
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 return node; 608 return node;
607 } 609 }
608 // Enqueue any children and keep looking. 610 // Enqueue any children and keep looking.
609 for (auto& child : node->children) 611 for (auto& child : node->children)
610 work_queue.push(child); 612 work_queue.push(child);
611 } 613 }
612 return nullptr; 614 return nullptr;
613 } 615 }
614 616
615 } // namespace content 617 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698