diff --git a/DEPS b/DEPS index e923976..4ae4d463 100644 --- a/DEPS +++ b/DEPS
@@ -44,7 +44,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': '2cba63960054ce9a88d4e3f1f5117b87566f6beb', + 'v8_revision': 'a6a5b322a1ffbb71c878441879fd6c2237e07642', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling swarming_client # and whatever else without interference from each other. @@ -96,7 +96,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': '47b98570f6e86ab98d28a572c4111fa15b22c3eb', + 'catapult_revision': 'a75c463e8416e25de8c1d70ec210a1de89ea19a5', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other. @@ -232,7 +232,7 @@ Var('chromium_git') + '/native_client/src/third_party/scons-2.0.1.git' + '@' + '1c1550e17fc26355d08627fbdec13d8291227067', 'src/third_party/webrtc': - Var('chromium_git') + '/external/webrtc/trunk/webrtc.git' + '@' + 'f17d9264a7603ecc568b058a49531cd3d281c7c4', # commit position 16850 + Var('chromium_git') + '/external/webrtc/trunk/webrtc.git' + '@' + '1c1bd4dc650bac02aa9a79037fd8e4da527fd857', # commit position 16857 'src/third_party/openmax_dl': Var('chromium_git') + '/external/webrtc/deps/third_party/openmax.git' + '@' + Var('openmax_dl_revision'),
diff --git a/chrome/app/chromium_strings.grd b/chrome/app/chromium_strings.grd index 6970012f..bb3e8b89 100644 --- a/chrome/app/chromium_strings.grd +++ b/chrome/app/chromium_strings.grd
@@ -365,7 +365,7 @@ </if> <!-- Password generation strings --> <message name="IDS_PASSWORD_GENERATION_PROMPT" desc="Autofill dropdown text describing password generation. The link text is a separate string in the translation console and appears here as placeholder text."> - Chromium will store this in your <ph name="SAVED_PASSWORD_LINK">$1<ex>Google saved passwords</ex></ph> and remember it the next time you need it. + Chromium will store this with <ph name="SAVED_PASSWORD_LINK">$1<ex>Google Smart Lock for Passwords</ex></ph> and remember it the next time you need it. </message> <message name="IDS_PASSWORD_GENERATION_SUGGESTION" desc="Text shown next to a generated password describing it as a suggestion."> Use password generated by Chromium
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 3904c793..4f3c701 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -11986,11 +11986,11 @@ Password saved </message> <message name="IDS_MANAGE_PASSWORDS_CONFIRM_GENERATED_TEXT" desc="A message that the browser shows after saving a password it has autogenerated for the user. This message appears in a bubble and contains a link to all the user's saved autogenerated passwords. The link text is a separate string in the translation console and appears here as placeholder text."> - You can access it and all your <ph name="SAVED_PASSWORDS_LINK">$1<ex>Google saved passwords</ex></ph> from any browser. + Access your passwords from any device at <ph name="SAVED_PASSWORDS_LINK">$1<ex>Google saved passwords</ex></ph>. </message> <if expr="is_android"> <message name="IDS_MANAGE_PASSWORDS_CONFIRM_GENERATED_TEXT_INFOBAR" desc="A message that the browser shows after saving a password it has autogenerated for the user. This message appears in an infobar and contains a link to all the user's saved autogenerated passwords. The link text is a separate string in the translation console and appears here as placeholder text."> - Password saved. You can access it and all your <ph name="SAVED_PASSWORDS_LINK">$1<ex>Google saved passwords</ex></ph> from any browser. + Password saved. Access your passwords from any device at <ph name="SAVED_PASSWORDS_LINK">$1<ex>Google saved passwords</ex></ph>. </message> </if> <message name="IDS_MANAGE_PASSWORDS_LINK" desc="The text for a link to the user's saved passwords. This is inserted into an infobar or a bubble that the browser shows to the user. The infobar and the bubble use a separate string in the translation console that has a placeholder for this link title.">
diff --git a/chrome/app/google_chrome_strings.grd b/chrome/app/google_chrome_strings.grd index a8948fb..7308086 100644 --- a/chrome/app/google_chrome_strings.grd +++ b/chrome/app/google_chrome_strings.grd
@@ -366,7 +366,7 @@ </if> <!-- Password generation strings --> <message name="IDS_PASSWORD_GENERATION_PROMPT" desc="Autofill dropdown text describing password generation. The link text is a separate string in the translation console and appears here as placeholder text."> - Chrome will store this in your <ph name="SAVED_PASSWORDS_LINK">$1<ex>Google saved passwords</ex></ph> and remember it the next time you need it. + Chrome will store this with <ph name="SAVED_PASSWORD_LINK">$1<ex>Google Smart Lock for Passwords</ex></ph> and remember it the next time you need it. </message> <message name="IDS_PASSWORD_GENERATION_SUGGESTION" desc="Text shown next to a generated password describing it as a suggestion."> Use password generated by Chrome
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.cc b/chrome/browser/predictors/resource_prefetch_predictor.cc index 557f5ad..a2916ba 100644 --- a/chrome/browser/predictors/resource_prefetch_predictor.cc +++ b/chrome/browser/predictors/resource_prefetch_predictor.cc
@@ -171,10 +171,9 @@ } void ReportPredictionAccuracy( - const std::vector<GURL>& predicted_urls, + const ResourcePrefetchPredictor::Prediction& prediction, const ResourcePrefetchPredictor::PageRequestSummary& summary) { - DCHECK(!predicted_urls.empty()); - + const std::vector<GURL>& predicted_urls = prediction.subresource_urls; if (predicted_urls.empty() || summary.subresource_requests.empty()) return; @@ -195,6 +194,26 @@ size_t recall_percentage = (100 * correctly_predicted_count) / actual_urls_set.size(); + using RedirectStatus = ResourcePrefetchPredictor::RedirectStatus; + RedirectStatus redirect_status; + if (summary.main_frame_url == summary.initial_url) { + // The actual navigation wasn't redirected. + redirect_status = prediction.is_redirected + ? RedirectStatus::NO_REDIRECT_BUT_PREDICTED + : RedirectStatus::NO_REDIRECT; + } else { + if (prediction.is_redirected) { + std::string main_frame_key = prediction.is_host + ? summary.main_frame_url.host() + : summary.main_frame_url.spec(); + redirect_status = main_frame_key == prediction.main_frame_key + ? RedirectStatus::REDIRECT_CORRECTLY_PREDICTED + : RedirectStatus::REDIRECT_WRONG_PREDICTED; + } else { + redirect_status = RedirectStatus::REDIRECT_NOT_PREDICTED; + } + } + UMA_HISTOGRAM_PERCENTAGE( internal::kResourcePrefetchPredictorPrecisionHistogram, precision_percentage); @@ -202,6 +221,9 @@ recall_percentage); UMA_HISTOGRAM_COUNTS_100(internal::kResourcePrefetchPredictorCountHistogram, predicted_urls.size()); + UMA_HISTOGRAM_ENUMERATION( + internal::kResourcePrefetchPredictorRedirectStatusHistogram, + static_cast<int>(redirect_status), static_cast<int>(RedirectStatus::MAX)); } } // namespace @@ -449,6 +471,13 @@ ResourcePrefetchPredictor::PageRequestSummary::~PageRequestSummary() {} +ResourcePrefetchPredictor::Prediction::Prediction() = default; + +ResourcePrefetchPredictor::Prediction::Prediction( + const ResourcePrefetchPredictor::Prediction& other) = default; + +ResourcePrefetchPredictor::Prediction::~Prediction() = default; + //////////////////////////////////////////////////////////////////////////////// // ResourcePrefetchPredictor. @@ -569,14 +598,14 @@ if (!config_.IsPrefetchingEnabledForOrigin(profile_, origin)) return; - std::vector<GURL> subresource_urls; - if (!GetPrefetchData(url, &subresource_urls)) + ResourcePrefetchPredictor::Prediction prediction; + if (!GetPrefetchData(url, &prediction)) return; BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::Bind(&ResourcePrefetcherManager::MaybeAddPrefetch, - prefetch_manager_, url, subresource_urls)); + prefetch_manager_, url, prediction.subresource_urls)); } void ResourcePrefetchPredictor::StopPrefetching(const GURL& url) { @@ -709,13 +738,13 @@ std::unique_ptr<PageRequestSummary> summary = std::move(nav_it->second); inflight_navigations_.erase(nav_it); - const GURL& main_frame_url = nav_id_without_timing_info.main_frame_url; - std::vector<GURL> predicted_urls; - bool has_data = GetPrefetchData(main_frame_url, &predicted_urls); + const GURL& initial_url = summary->initial_url; + ResourcePrefetchPredictor::Prediction prediction; + bool has_data = GetPrefetchData(initial_url, &prediction); if (has_data) - ReportPredictionAccuracy(predicted_urls, *summary); + ReportPredictionAccuracy(prediction, *summary); - auto it = prefetcher_stats_.find(main_frame_url); + auto it = prefetcher_stats_.find(initial_url); if (it != prefetcher_stats_.end()) { const std::vector<URLRequestSummary>& summaries = summary->subresource_requests; @@ -744,8 +773,11 @@ } } -bool ResourcePrefetchPredictor::GetPrefetchData(const GURL& main_frame_url, - std::vector<GURL>* urls) const { +bool ResourcePrefetchPredictor::GetPrefetchData( + const GURL& main_frame_url, + ResourcePrefetchPredictor::Prediction* prediction) const { + std::vector<GURL>* urls = + prediction ? &prediction->subresource_urls : nullptr; DCHECK(!urls || urls->empty()); // Fetch URLs based on a redirect endpoint for URL/host first. @@ -753,23 +785,47 @@ if (GetRedirectEndpoint(main_frame_url.spec(), *url_redirect_table_cache_, &redirect_endpoint) && PopulatePrefetcherRequest(redirect_endpoint, *url_table_cache_, urls)) { + if (prediction) { + prediction->is_host = false; + prediction->is_redirected = true; + prediction->main_frame_key = redirect_endpoint; + } return true; } if (GetRedirectEndpoint(main_frame_url.host(), *host_redirect_table_cache_, &redirect_endpoint) && PopulatePrefetcherRequest(redirect_endpoint, *host_table_cache_, urls)) { + if (prediction) { + prediction->is_host = true; + prediction->is_redirected = true; + prediction->main_frame_key = redirect_endpoint; + } return true; } // Fallback to fetching URLs based on the incoming URL/host. if (PopulatePrefetcherRequest(main_frame_url.spec(), *url_table_cache_, urls)) { + if (prediction) { + prediction->is_host = false; + prediction->is_redirected = false; + prediction->main_frame_key = main_frame_url.spec(); + } return true; } - return PopulatePrefetcherRequest(main_frame_url.host(), *host_table_cache_, - urls); + if (PopulatePrefetcherRequest(main_frame_url.host(), *host_table_cache_, + urls)) { + if (prediction) { + prediction->is_host = true; + prediction->is_redirected = false; + prediction->main_frame_key = main_frame_url.host(); + } + return true; + } + + return false; } bool ResourcePrefetchPredictor::PopulatePrefetcherRequest(
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.h b/chrome/browser/predictors/resource_prefetch_predictor.h index 25514ab..60f057c 100644 --- a/chrome/browser/predictors/resource_prefetch_predictor.h +++ b/chrome/browser/predictors/resource_prefetch_predictor.h
@@ -59,6 +59,8 @@ "ResourcePrefetchPredictor.PrefetchHitsSizeKB"; constexpr char kResourcePrefetchPredictorPrefetchMissesSize[] = "ResourcePrefetchPredictor.PrefetchMissesSizeKB"; +constexpr char kResourcePrefetchPredictorRedirectStatusHistogram[] = + "ResourcePrefetchPredictor.RedirectStatus"; } // namespace internal class TestObserver; @@ -140,6 +142,31 @@ std::vector<URLRequestSummary> subresource_requests; }; + // Stores a result of prediction. Essentially, |subresource_urls| is main + // result and other fields are used for diagnosis and histograms reporting. + struct Prediction { + Prediction(); + Prediction(const Prediction& other); + ~Prediction(); + + bool is_host; + bool is_redirected; + std::string main_frame_key; + std::vector<GURL> subresource_urls; + }; + + // Used for reporting redirect prediction success/failure in histograms. + // NOTE: This enumeration is used in histograms, so please do not add entries + // in the middle. + enum class RedirectStatus { + NO_REDIRECT, + NO_REDIRECT_BUT_PREDICTED, + REDIRECT_NOT_PREDICTED, + REDIRECT_WRONG_PREDICTED, + REDIRECT_CORRECTLY_PREDICTED, + MAX + }; + ResourcePrefetchPredictor(const ResourcePrefetchPredictorConfig& config, Profile* profile); ~ResourcePrefetchPredictor() override; @@ -278,10 +305,11 @@ void OnNavigationComplete(const NavigationID& nav_id_without_timing_info); // Returns true iff there is PrefetchData that can be used for a - // |main_frame_url| and fills |urls| with resources that need to be - // prefetched. |urls| pointer may be equal nullptr to get return value only. + // |main_frame_url| and fills |prediction| with resources that need to be + // prefetched. |prediction| pointer may be equal nullptr to get return value + // only. bool GetPrefetchData(const GURL& main_frame_url, - std::vector<GURL>* urls) const; + Prediction* prediction) const; // Returns true iff the |data_map| contains PrefetchData that can be used // for a |main_frame_key| and fills |urls| with resources that need to be
diff --git a/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc b/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc index 2fac583..460c10a 100644 --- a/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc +++ b/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
@@ -21,7 +21,6 @@ #include "components/history/core/browser/history_types.h" #include "components/sessions/core/session_id.h" #include "content/public/browser/resource_request_info.h" -#include "content/public/common/previews_state.h" #include "content/public/test/test_browser_thread_bundle.h" #include "net/http/http_response_headers.h" #include "net/url_request/url_request_context.h" @@ -224,15 +223,6 @@ profile_->BlockUntilHistoryProcessesPendingRequests(); } - bool URLRequestSummaryAreEqual(const URLRequestSummary& lhs, - const URLRequestSummary& rhs) { - return lhs.navigation_id == rhs.navigation_id && - lhs.resource_url == rhs.resource_url && - lhs.resource_type == rhs.resource_type && - lhs.mime_type == rhs.mime_type && - lhs.was_cached == rhs.was_cached; - } - void ResetPredictor() { ResourcePrefetchPredictorConfig config; config.max_urls_to_track = 3; @@ -249,13 +239,19 @@ } void InitializeSampleData(); + void TestRedirectStatusHistogram( + const std::string& predictor_initial_key, + const std::string& predictor_key, + const std::string& navigation_initial_url, + const std::string& navigation_url, + ResourcePrefetchPredictor::RedirectStatus expected_status); content::TestBrowserThreadBundle thread_bundle_; std::unique_ptr<TestingProfile> profile_; net::TestURLRequestContext url_request_context_; std::unique_ptr<ResourcePrefetchPredictor> predictor_; - scoped_refptr<StrictMock<MockResourcePrefetchPredictorTables> > mock_tables_; + scoped_refptr<StrictMock<MockResourcePrefetchPredictorTables>> mock_tables_; PrefetchDataMap test_url_data_; PrefetchDataMap test_host_data_; @@ -426,6 +422,58 @@ } } +void ResourcePrefetchPredictorTest::TestRedirectStatusHistogram( + const std::string& predictor_initial_key, + const std::string& predictor_key, + const std::string& navigation_initial_url, + const std::string& navigation_url, + ResourcePrefetchPredictor::RedirectStatus expected_status) { + // Database initialization. + const std::string& script_url = "https://cdn.google.com/script.js"; + PrefetchData google = CreatePrefetchData(predictor_key, 1); + // We need at least one resource for prediction. + InitializeResourceData(google.add_resources(), script_url, + content::RESOURCE_TYPE_SCRIPT, 10, 0, 1, 2.1, + net::MEDIUM, false, false); + predictor_->host_table_cache_->insert( + std::make_pair(google.primary_key(), google)); + + if (predictor_initial_key != predictor_key) { + RedirectData redirect = CreateRedirectData(predictor_initial_key, 1); + InitializeRedirectStat(redirect.add_redirect_endpoints(), predictor_key, 10, + 0, 0); + predictor_->host_redirect_table_cache_->insert( + std::make_pair(redirect.primary_key(), redirect)); + } + + // Navigation simulation. + using testing::_; + EXPECT_CALL(*mock_tables_.get(), UpdateData(_, _, _, _)) + .Times(testing::AtLeast(1)); + URLRequestSummary initial = + CreateURLRequestSummary(1, navigation_initial_url); + predictor_->RecordURLRequest(initial); + + if (navigation_initial_url != navigation_url) { + URLRequestSummary redirect = + CreateRedirectRequestSummary(1, navigation_initial_url, navigation_url); + predictor_->RecordURLRedirect(redirect); + } + NavigationID navigation_id = CreateNavigationID(1, navigation_url); + + URLRequestSummary script = CreateURLRequestSummary( + 1, navigation_url, script_url, content::RESOURCE_TYPE_SCRIPT); + predictor_->RecordURLResponse(script); + + predictor_->RecordMainFrameLoadComplete(navigation_id); + profile_->BlockUntilHistoryProcessesPendingRequests(); + + // Histogram check. + histogram_tester_->ExpectBucketCount( + internal::kResourcePrefetchPredictorRedirectStatusHistogram, + static_cast<int>(expected_status), 1); +} + // Confirm that there's been no shift in the // ResourceData_Priority/net::RequestPriority equivalence. static_assert(static_cast<int>(net::MINIMUM_PRIORITY) == @@ -1136,15 +1184,15 @@ EXPECT_EQ(1U, predictor_->inflight_navigations_.size()); EXPECT_EQ(3U, predictor_->inflight_navigations_[main_frame1.navigation_id] ->subresource_requests.size()); - EXPECT_TRUE(URLRequestSummaryAreEqual( - resource1, predictor_->inflight_navigations_[main_frame1.navigation_id] - ->subresource_requests[0])); - EXPECT_TRUE(URLRequestSummaryAreEqual( - resource2, predictor_->inflight_navigations_[main_frame1.navigation_id] - ->subresource_requests[1])); - EXPECT_TRUE(URLRequestSummaryAreEqual( - resource3, predictor_->inflight_navigations_[main_frame1.navigation_id] - ->subresource_requests[2])); + EXPECT_EQ(resource1, + predictor_->inflight_navigations_[main_frame1.navigation_id] + ->subresource_requests[0]); + EXPECT_EQ(resource2, + predictor_->inflight_navigations_[main_frame1.navigation_id] + ->subresource_requests[1]); + EXPECT_EQ(resource3, + predictor_->inflight_navigations_[main_frame1.navigation_id] + ->subresource_requests[2]); } TEST_F(ResourcePrefetchPredictorTest, HandledResourceTypes) { @@ -1473,9 +1521,10 @@ TEST_F(ResourcePrefetchPredictorTest, GetPrefetchData) { const GURL main_frame_url("http://google.com/?query=cats"); - std::vector<GURL> urls; + ResourcePrefetchPredictor::Prediction prediction; + std::vector<GURL>& urls = prediction.subresource_urls; // No prefetch data. - EXPECT_FALSE(predictor_->GetPrefetchData(main_frame_url, &urls)); + EXPECT_FALSE(predictor_->GetPrefetchData(main_frame_url, &prediction)); // Add a resource associated with the main frame host. PrefetchData google_host = CreatePrefetchData("google.com", 1); @@ -1487,7 +1536,7 @@ std::make_pair(google_host.primary_key(), google_host)); urls.clear(); - EXPECT_TRUE(predictor_->GetPrefetchData(main_frame_url, &urls)); + EXPECT_TRUE(predictor_->GetPrefetchData(main_frame_url, &prediction)); EXPECT_THAT(urls, UnorderedElementsAre(GURL(script_url))); // Add a resource associated with the main frame url. @@ -1501,7 +1550,7 @@ std::make_pair(google_url.primary_key(), google_url)); urls.clear(); - EXPECT_TRUE(predictor_->GetPrefetchData(main_frame_url, &urls)); + EXPECT_TRUE(predictor_->GetPrefetchData(main_frame_url, &prediction)); EXPECT_THAT(urls, UnorderedElementsAre(GURL(image_url))); // Add host-based redirect. @@ -1514,7 +1563,7 @@ // Nothing changed: new redirect endpoint doesn't have any associated // resources urls.clear(); - EXPECT_TRUE(predictor_->GetPrefetchData(main_frame_url, &urls)); + EXPECT_TRUE(predictor_->GetPrefetchData(main_frame_url, &prediction)); EXPECT_THAT(urls, UnorderedElementsAre(GURL(image_url))); // Add a resource associated with host redirect endpoint. @@ -1527,7 +1576,7 @@ std::make_pair(www_google_host.primary_key(), www_google_host)); urls.clear(); - EXPECT_TRUE(predictor_->GetPrefetchData(main_frame_url, &urls)); + EXPECT_TRUE(predictor_->GetPrefetchData(main_frame_url, &prediction)); EXPECT_THAT(urls, UnorderedElementsAre(GURL(style_url))); // Add url-based redirect. @@ -1540,7 +1589,7 @@ // Url redirect endpoint doesn't have associated resources. urls.clear(); - EXPECT_TRUE(predictor_->GetPrefetchData(main_frame_url, &urls)); + EXPECT_TRUE(predictor_->GetPrefetchData(main_frame_url, &prediction)); EXPECT_THAT(urls, UnorderedElementsAre(GURL(style_url))); // Add a resource associated with url redirect endpoint. @@ -1554,7 +1603,7 @@ std::make_pair(www_google_url.primary_key(), www_google_url)); urls.clear(); - EXPECT_TRUE(predictor_->GetPrefetchData(main_frame_url, &urls)); + EXPECT_TRUE(predictor_->GetPrefetchData(main_frame_url, &prediction)); EXPECT_THAT(urls, UnorderedElementsAre(GURL(font_url))); } @@ -1579,8 +1628,8 @@ predictor_->host_table_cache_->insert( std::make_pair(google.primary_key(), google)); - std::vector<GURL> urls; - EXPECT_TRUE(predictor_->GetPrefetchData(GURL(main_frame_url), &urls)); + ResourcePrefetchPredictor::Prediction prediction; + EXPECT_TRUE(predictor_->GetPrefetchData(GURL(main_frame_url), &prediction)); // Simulate a navigation with 2 resources, one we know, one we don't. URLRequestSummary main_frame = CreateURLRequestSummary(1, main_frame_url); @@ -1605,6 +1654,44 @@ internal::kResourcePrefetchPredictorCountHistogram, 3, 1); } +TEST_F(ResourcePrefetchPredictorTest, TestRedirectStatusNoRedirect) { + TestRedirectStatusHistogram( + "google.com", "google.com", "http://google.com?query=cats", + "http://google.com?query=cats", + ResourcePrefetchPredictor::RedirectStatus::NO_REDIRECT); +} + +TEST_F(ResourcePrefetchPredictorTest, + TestRedirectStatusNoRedirectButPredicted) { + TestRedirectStatusHistogram( + "google.com", "www.google.com", "http://google.com?query=cats", + "http://google.com?query=cats", + ResourcePrefetchPredictor::RedirectStatus::NO_REDIRECT_BUT_PREDICTED); +} + +TEST_F(ResourcePrefetchPredictorTest, TestRedirectStatusRedirectNotPredicted) { + TestRedirectStatusHistogram( + "google.com", "google.com", "http://google.com?query=cats", + "http://www.google.com?query=cats", + ResourcePrefetchPredictor::RedirectStatus::REDIRECT_NOT_PREDICTED); +} + +TEST_F(ResourcePrefetchPredictorTest, + TestRedirectStatusRedirectWrongPredicted) { + TestRedirectStatusHistogram( + "google.com", "google.fr", "http://google.com?query=cats", + "http://www.google.com?query=cats", + ResourcePrefetchPredictor::RedirectStatus::REDIRECT_WRONG_PREDICTED); +} + +TEST_F(ResourcePrefetchPredictorTest, + TestRedirectStatusRedirectCorrectlyPredicted) { + TestRedirectStatusHistogram( + "google.com", "www.google.com", "http://google.com?query=cats", + "http://www.google.com?query=cats", + ResourcePrefetchPredictor::RedirectStatus::REDIRECT_CORRECTLY_PREDICTED); +} + TEST_F(ResourcePrefetchPredictorTest, TestPrefetchingDurationHistogram) { // Prefetching duration for an url without resources in the database // shouldn't be recorded.
diff --git a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc index 524f0165..4a4004fb 100644 --- a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc +++ b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
@@ -16,7 +16,7 @@ #include "chrome/browser/ui/autofill/password_generation_popup_view.h" #include "chrome/browser/ui/autofill/popup_constants.h" #include "chrome/browser/ui/browser_finder.h" -#include "chrome/browser/ui/chrome_pages.h" +#include "chrome/browser/ui/browser_navigator_params.h" #include "chrome/common/url_constants.h" #include "chrome/grit/chromium_strings.h" #include "chrome/grit/generated_resources.h" @@ -24,6 +24,8 @@ #include "components/autofill/core/browser/suggestion.h" #include "components/password_manager/core/browser/password_bubble_experiment.h" #include "components/password_manager/core/browser/password_manager.h" +#include "components/password_manager/core/browser/password_manager_constants.h" +#include "components/strings/grit/components_strings.h" #include "content/public/browser/native_web_keyboard_event.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" @@ -93,7 +95,8 @@ base::Bind(&PasswordGenerationPopupControllerImpl::HandleKeyPressEvent, base::Unretained(this))); - base::string16 link = l10n_util::GetStringUTF16(IDS_MANAGE_PASSWORDS_LINK); + base::string16 link = + l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SMART_LOCK); size_t offset = 0; help_text_ = l10n_util::GetStringFUTF16(IDS_PASSWORD_GENERATION_PROMPT, link, &offset); @@ -225,9 +228,12 @@ #if defined(OS_ANDROID) chrome::android::ChromeApplication::ShowPasswordSettings(); #else - chrome::ShowSettingsSubPage( - chrome::FindBrowserWithWebContents(controller_common_.web_contents()), - chrome::kPasswordManagerSubPage); + chrome::NavigateParams params( + chrome::FindBrowserWithWebContents(web_contents()), + GURL(password_manager::kPasswordManagerAccountDashboardURL), + ui::PAGE_TRANSITION_LINK); + params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; + chrome::Navigate(¶ms); #endif }
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc index a5c544e..3762b226 100644 --- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc +++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
@@ -258,8 +258,11 @@ } if (state_ == password_manager::ui::CONFIRMATION_STATE) { - base::string16 save_confirmation_link = - l10n_util::GetStringUTF16(IDS_MANAGE_PASSWORDS_LINK); + base::string16 save_confirmation_link = base::UTF8ToUTF16( + GURL(base::ASCIIToUTF16( + password_manager::kPasswordManagerAccountDashboardURL)) + .host()); + size_t offset; save_confirmation_text_ = l10n_util::GetStringFUTF16(IDS_MANAGE_PASSWORDS_CONFIRM_GENERATED_TEXT, @@ -375,6 +378,13 @@ delegate_->NavigateToPasswordManagerSettingsPage(); } +void ManagePasswordsBubbleModel:: + OnNavigateToPasswordManagerAccountDashboardLinkClicked() { + interaction_keeper_->set_dismissal_reason( + metrics_util::CLICKED_PASSWORDS_DASHBOARD); + delegate_->NavigateToPasswordManagerAccountDashboard(); +} + void ManagePasswordsBubbleModel::OnBrandLinkClicked() { interaction_keeper_->set_dismissal_reason(metrics_util::CLICKED_BRAND_NAME); delegate_->NavigateToSmartLockHelpPage();
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.h b/chrome/browser/ui/passwords/manage_passwords_bubble_model.h index ae4a9b8..0ff5bfa 100644 --- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.h +++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.h
@@ -61,6 +61,10 @@ // Called by the view code when the manage link is clicked by the user. void OnManageLinkClicked(); + // Called by the view code when the navigate to passwords.google.com link is + // clicked by the user. + void OnNavigateToPasswordManagerAccountDashboardLinkClicked(); + // Called by the view code when the brand name link is clicked by the user. void OnBrandLinkClicked();
diff --git a/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc b/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc index ae8e69f..5c62915 100644 --- a/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc +++ b/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc
@@ -337,6 +337,15 @@ chrome::kPasswordManagerSubPage); } +void ManagePasswordsUIController::NavigateToPasswordManagerAccountDashboard() { + chrome::NavigateParams params( + chrome::FindBrowserWithWebContents(web_contents()), + GURL(password_manager::kPasswordManagerAccountDashboardURL), + ui::PAGE_TRANSITION_LINK); + params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; + chrome::Navigate(¶ms); +} + void ManagePasswordsUIController::NavigateToChromeSignIn() { Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); browser->window()->ShowAvatarBubbleFromAvatarButton(
diff --git a/chrome/browser/ui/passwords/manage_passwords_ui_controller.h b/chrome/browser/ui/passwords/manage_passwords_ui_controller.h index d3db967..dfcfa146 100644 --- a/chrome/browser/ui/passwords/manage_passwords_ui_controller.h +++ b/chrome/browser/ui/passwords/manage_passwords_ui_controller.h
@@ -103,6 +103,7 @@ const autofill::PasswordForm& form, password_manager::CredentialType credential_type) override; void NavigateToSmartLockHelpPage() override; + void NavigateToPasswordManagerAccountDashboard() override; void NavigateToPasswordManagerSettingsPage() override; void NavigateToChromeSignIn() override; void OnDialogHidden() override;
diff --git a/chrome/browser/ui/passwords/passwords_model_delegate.h b/chrome/browser/ui/passwords/passwords_model_delegate.h index 4f165a09..c904b2b 100644 --- a/chrome/browser/ui/passwords/passwords_model_delegate.h +++ b/chrome/browser/ui/passwords/passwords_model_delegate.h
@@ -83,6 +83,8 @@ // Open a new tab, pointing to the Smart Lock help article. virtual void NavigateToSmartLockHelpPage() = 0; + // Open a new tab, pointing to passwords.google.com. + virtual void NavigateToPasswordManagerAccountDashboard() = 0; // Open a new tab, pointing to the password manager settings page. virtual void NavigateToPasswordManagerSettingsPage() = 0; // Starts the Chrome Sign in flow.
diff --git a/chrome/browser/ui/passwords/passwords_model_delegate_mock.h b/chrome/browser/ui/passwords/passwords_model_delegate_mock.h index 209f3e26..87bd2a54 100644 --- a/chrome/browser/ui/passwords/passwords_model_delegate_mock.h +++ b/chrome/browser/ui/passwords/passwords_model_delegate_mock.h
@@ -38,6 +38,7 @@ password_manager::CredentialType)); MOCK_METHOD0(NavigateToSmartLockPage, void()); MOCK_METHOD0(NavigateToSmartLockHelpPage, void()); + MOCK_METHOD0(NavigateToPasswordManagerAccountDashboard, void()); MOCK_METHOD0(NavigateToPasswordManagerSettingsPage, void()); MOCK_METHOD0(NavigateToChromeSignIn, void()); MOCK_METHOD0(OnDialogHidden, void());
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc index dac8e42..106e23c 100644 --- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc +++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
@@ -517,7 +517,7 @@ const gfx::Range& range, int event_flags) { DCHECK_EQ(range, parent_->model()->save_confirmation_link_range()); - parent_->model()->OnManageLinkClicked(); + parent_->model()->OnNavigateToPasswordManagerAccountDashboardLinkClicked(); parent_->CloseBubble(); }
diff --git a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc index 182010fd..b598bcc 100644 --- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc +++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
@@ -2516,4 +2516,25 @@ } } +// Tests that a suggestion dropdown is shown even if JavaScripts updated field +// names. +TEST_F(PasswordAutofillAgentTest, SuggestWhenJavaScriptUpdatesFieldNames) { + // Simulate that JavaScript updated field names. + auto fill_data = fill_data_; + fill_data.username_field.name += ASCIIToUTF16("1"); + fill_data.password_field.name += ASCIIToUTF16("1"); + // Simulate the browser sending back the login info. + SimulateOnFillPasswordForm(fill_data); + + // Call SimulateElementClick() to produce a user gesture on the page so + // autofill will actually fill. + SimulateElementClick(kUsernameName); + + // Simulate a user clicking on the password element. This should produce a + // dropdown with suggestion of all available usernames. + static_cast<PageClickListener*>(autofill_agent_) + ->FormControlElementClicked(password_element_, false); + CheckSuggestions("", false); +} + } // namespace autofill
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc index 1120b1e..abac9479 100644 --- a/components/autofill/content/renderer/password_autofill_agent.cc +++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -1432,6 +1432,19 @@ if (elements) elements->push_back(main_element); } + + // This is a fallback, if for some reasons elements for filling were not found + // (for example because they were renamed by JavaScript) then add fill data + // for |web_input_to_password_info_|. When the user clicks on a password + // field which is not a key in |web_input_to_password_info_|, the first + // element from |web_input_to_password_info_| will be used in + // PasswordAutofillAgent::FindPasswordInfoForElement to propose to fill. + if (web_input_to_password_info_.empty()) { + PasswordInfo password_info; + password_info.fill_data = form_data; + password_info.key = key; + web_input_to_password_info_[blink::WebInputElement()] = password_info; + } } void PasswordAutofillAgent::FocusedNodeHasChanged(const blink::WebNode& node) {
diff --git a/components/password_manager/core/browser/password_manager_metrics_util.h b/components/password_manager/core/browser/password_manager_metrics_util.h index e166754..040a3be6 100644 --- a/components/password_manager/core/browser/password_manager_metrics_util.h +++ b/components/password_manager/core/browser/password_manager_metrics_util.h
@@ -52,6 +52,7 @@ AUTO_SIGNIN_TOAST_TIMEOUT, AUTO_SIGNIN_TOAST_CLICKED_OBSOLETE, // obsolete. CLICKED_BRAND_NAME, + CLICKED_PASSWORDS_DASHBOARD, NUM_UI_RESPONSES, };
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json index 1e3e958..ded99e0 100644 --- a/components/policy/resources/policy_templates.json +++ b/components/policy/resources/policy_templates.json
@@ -1378,7 +1378,7 @@ 'id': 19, 'caption': '''Specify a list of disabled plugins''', 'tags': [], - 'desc': '''This policy is deprecated. Please use the <ph name="DEFAULT_PLUGINS_SETTING_POLICY">$1<ex>DefaultPluginsSetting</ex></ph> to control the avalability of the Flash plugin and <ph name="ALWAYS_OPEN_PDF_EXTERNALLY_POLICY">$1<ex>AlwaysOpenPdfExternally</ex></ph> to control whether the integrated PDF viewer should be used for opening PDF files. + 'desc': '''This policy is deprecated. Please use the <ph name="DEFAULT_PLUGINS_SETTING_POLICY">DefaultPluginsSetting</ph> to control the avalability of the Flash plugin and <ph name="ALWAYS_OPEN_PDF_EXTERNALLY_POLICY">AlwaysOpenPdfExternally</ph> to control whether the integrated PDF viewer should be used for opening PDF files. Specifies a list of plugins that are disabled in <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> and prevents users from changing this setting. @@ -1408,7 +1408,7 @@ 'id': 78, 'caption': '''Specify a list of enabled plugins''', 'tags': ['system-security'], - 'desc': '''This policy is deprecated. Please use the <ph name="DEFAULT_PLUGINS_SETTING_POLICY">$1<ex>DefaultPluginsSetting</ex></ph> to control the avalability of the Flash plugin and <ph name="ALWAYS_OPEN_PDF_EXTERNALLY_POLICY">$1<ex>AlwaysOpenPdfExternally</ex></ph> to control whether the integrated PDF viewer should be used for opening PDF files. + 'desc': '''This policy is deprecated. Please use the <ph name="DEFAULT_PLUGINS_SETTING_POLICY">DefaultPluginsSetting</ph> to control the avalability of the Flash plugin and <ph name="ALWAYS_OPEN_PDF_EXTERNALLY_POLICY">AlwaysOpenPdfExternally</ph> to control whether the integrated PDF viewer should be used for opening PDF files. Specifies a list of plugins that are enabled in <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> and prevents users from changing this setting. @@ -1438,7 +1438,7 @@ 'id': 79, 'caption': '''Specify a list of plugins that the user can enable or disable''', 'tags': [], - 'desc': '''This policy is deprecated. Please use the <ph name="DEFAULT_PLUGINS_SETTING_POLICY">$1<ex>DefaultPluginsSetting</ex></ph> to control the avalability of the Flash plugin and <ph name="ALWAYS_OPEN_PDF_EXTERNALLY_POLICY">$1<ex>AlwaysOpenPdfExternally</ex></ph> to control whether the integrated PDF viewer should be used for opening PDF files. + 'desc': '''This policy is deprecated. Please use the <ph name="DEFAULT_PLUGINS_SETTING_POLICY">DefaultPluginsSetting</ph> to control the avalability of the Flash plugin and <ph name="ALWAYS_OPEN_PDF_EXTERNALLY_POLICY">AlwaysOpenPdfExternally</ph> to control whether the integrated PDF viewer should be used for opening PDF files. Specifies a list of plugins that user can enable or disable in <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>.
diff --git a/headless/lib/browser/headless_browser_context_impl.cc b/headless/lib/browser/headless_browser_context_impl.cc index 0d4de19..29c9da3 100644 --- a/headless/lib/browser/headless_browser_context_impl.cc +++ b/headless/lib/browser/headless_browser_context_impl.cc
@@ -320,6 +320,13 @@ } HeadlessBrowserContext::Builder& +HeadlessBrowserContext::Builder::SetProductNameAndVersion( + const std::string& product_name_and_version) { + options_->product_name_and_version_ = product_name_and_version; + return *this; +} + +HeadlessBrowserContext::Builder& HeadlessBrowserContext::Builder::SetProxyServer( const net::HostPortPair& proxy_server) { options_->proxy_server_ = proxy_server;
diff --git a/headless/lib/browser/headless_browser_context_options.cc b/headless/lib/browser/headless_browser_context_options.cc index 2dd7939..f9fa824 100644 --- a/headless/lib/browser/headless_browser_context_options.cc +++ b/headless/lib/browser/headless_browser_context_options.cc
@@ -35,6 +35,12 @@ HeadlessBrowser::Options* options) : browser_options_(options) {} +const std::string& HeadlessBrowserContextOptions::product_name_and_version() + const { + return ReturnOverriddenValue(product_name_and_version_, + browser_options_->product_name_and_version); +} + const std::string& HeadlessBrowserContextOptions::user_agent() const { return ReturnOverriddenValue(user_agent_, browser_options_->user_agent); }
diff --git a/headless/lib/browser/headless_browser_context_options.h b/headless/lib/browser/headless_browser_context_options.h index b0e3cc87..61f2b23 100644 --- a/headless/lib/browser/headless_browser_context_options.h +++ b/headless/lib/browser/headless_browser_context_options.h
@@ -26,6 +26,7 @@ HeadlessBrowserContextOptions& operator=( HeadlessBrowserContextOptions&& options); + const std::string& product_name_and_version() const; const std::string& user_agent() const; // See HeadlessBrowser::Options::proxy_server. @@ -60,6 +61,7 @@ HeadlessBrowser::Options* browser_options_; + base::Optional<std::string> product_name_and_version_; base::Optional<std::string> user_agent_; base::Optional<net::HostPortPair> proxy_server_; base::Optional<std::string> host_resolver_rules_;
diff --git a/headless/lib/browser/headless_devtools.cc b/headless/lib/browser/headless_devtools.cc index ea97afc..88b9656 100644 --- a/headless/lib/browser/headless_devtools.cc +++ b/headless/lib/browser/headless_devtools.cc
@@ -56,15 +56,14 @@ } // namespace -void StartLocalDevToolsHttpHandler( - HeadlessBrowser::Options* options) { +void StartLocalDevToolsHttpHandler(HeadlessBrowser::Options* options) { const net::IPEndPoint& endpoint = options->devtools_endpoint; std::unique_ptr<content::DevToolsSocketFactory> socket_factory( new TCPServerSocketFactory(endpoint)); content::DevToolsAgentHost::StartRemoteDebuggingServer( std::move(socket_factory), std::string(), options->user_data_dir, // TODO(altimin): Figure a proper value for this. - base::FilePath(), std::string(), options->user_agent); + base::FilePath(), options->product_name_and_version, options->user_agent); } void StopLocalDevToolsHttpHandler() {
diff --git a/headless/lib/headless_content_client.cc b/headless/lib/headless_content_client.cc index 4269da6..333f43a 100644 --- a/headless/lib/headless_content_client.cc +++ b/headless/lib/headless_content_client.cc
@@ -14,6 +14,10 @@ HeadlessContentClient::~HeadlessContentClient() {} +std::string HeadlessContentClient::GetProduct() const { + return options_->product_name_and_version; +} + std::string HeadlessContentClient::GetUserAgent() const { return options_->user_agent; }
diff --git a/headless/lib/headless_content_client.h b/headless/lib/headless_content_client.h index 56775bd0..eb4d07d 100644 --- a/headless/lib/headless_content_client.h +++ b/headless/lib/headless_content_client.h
@@ -16,6 +16,7 @@ ~HeadlessContentClient() override; // content::ContentClient implementation: + std::string GetProduct() const override; std::string GetUserAgent() const override; base::string16 GetLocalizedString(int message_id) const override; base::StringPiece GetDataResource(
diff --git a/headless/public/headless_browser.cc b/headless/public/headless_browser.cc index 474809c..caa24e7 100644 --- a/headless/public/headless_browser.cc +++ b/headless/public/headless_browser.cc
@@ -7,17 +7,22 @@ #include <utility> #include "content/public/common/user_agent.h" +#include "headless/public/version.h" using Options = headless::HeadlessBrowser::Options; using Builder = headless::HeadlessBrowser::Options::Builder; namespace headless { -// Product name for building the default user agent string. namespace { +// Product name for building the default user agent string. const char kProductName[] = "HeadlessChrome"; constexpr gfx::Size kDefaultWindowSize(800, 600); + +std::string GetProductNameAndVersion() { + return std::string(kProductName) + "/" + PRODUCT_VERSION; } +} // namespace Options::Options(int argc, const char** argv) : argc(argc), @@ -26,7 +31,8 @@ single_process_mode(false), disable_sandbox(false), gl_implementation("osmesa"), - user_agent(content::BuildUserAgentFromProduct(kProductName)), + product_name_and_version(GetProductNameAndVersion()), + user_agent(content::BuildUserAgentFromProduct(product_name_and_version)), window_size(kDefaultWindowSize), incognito_mode(true), enable_crash_reporter(false) {} @@ -43,6 +49,12 @@ Builder::~Builder() {} +Builder& Builder::SetProductNameAndVersion( + const std::string& product_name_and_version) { + options_.product_name_and_version = product_name_and_version; + return *this; +} + Builder& Builder::SetUserAgent(const std::string& user_agent) { options_.user_agent = user_agent; return *this;
diff --git a/headless/public/headless_browser.h b/headless/public/headless_browser.h index 9997494..4b18f56 100644 --- a/headless/public/headless_browser.h +++ b/headless/public/headless_browser.h
@@ -128,6 +128,7 @@ // Default per-context options, can be specialized on per-context basis. + std::string product_name_and_version; std::string user_agent; // Address of the HTTP/HTTPS proxy server to use. The system proxy settings @@ -188,6 +189,8 @@ // Per-context settings. + Builder& SetProductNameAndVersion( + const std::string& product_name_and_version); Builder& SetUserAgent(const std::string& user_agent); Builder& SetProxyServer(const net::HostPortPair& proxy_server); Builder& SetHostResolverRules(const std::string& host_resolver_rules);
diff --git a/headless/public/headless_browser_context.h b/headless/public/headless_browser_context.h index c913305b..4bdd7a5 100644 --- a/headless/public/headless_browser_context.h +++ b/headless/public/headless_browser_context.h
@@ -106,6 +106,8 @@ // By default |HeadlessBrowserContext| inherits the following options from // the browser instance. The methods below can be used to override these // settings. See HeadlessBrowser::Options for their meaning. + Builder& SetProductNameAndVersion( + const std::string& product_name_and_version); Builder& SetUserAgent(const std::string& user_agent); Builder& SetProxyServer(const net::HostPortPair& proxy_server); Builder& SetHostResolverRules(const std::string& host_resolver_rules);
diff --git a/third_party/WebKit/Source/core/animation/AnimationTestHelper.h b/third_party/WebKit/Source/core/animation/AnimationTestHelper.h index a1db7dc..e2e6b9f 100644 --- a/third_party/WebKit/Source/core/animation/AnimationTestHelper.h +++ b/third_party/WebKit/Source/core/animation/AnimationTestHelper.h
@@ -5,9 +5,9 @@ #ifndef AnimationTestHelper_h #define AnimationTestHelper_h +#include "v8/include/v8.h" #include "wtf/text/StringView.h" #include "wtf/text/WTFString.h" -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/core/animation/EffectInputTest.cpp b/third_party/WebKit/Source/core/animation/EffectInputTest.cpp index 017d5ec..ffd4947 100644 --- a/third_party/WebKit/Source/core/animation/EffectInputTest.cpp +++ b/third_party/WebKit/Source/core/animation/EffectInputTest.cpp
@@ -4,6 +4,8 @@ #include "core/animation/EffectInput.h" +#include <memory> + #include "bindings/core/v8/Dictionary.h" #include "bindings/core/v8/DictionarySequenceOrDictionary.h" #include "bindings/core/v8/V8BindingForTesting.h" @@ -14,8 +16,7 @@ #include "core/dom/ExceptionCode.h" #include "core/testing/DummyPageHolder.h" #include "testing/gtest/include/gtest/gtest.h" -#include <memory> -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp b/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp index ac69476..dfc9f5b5 100644 --- a/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp +++ b/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp
@@ -4,6 +4,8 @@ #include "core/animation/KeyframeEffect.h" +#include <memory> + #include "bindings/core/v8/Dictionary.h" #include "bindings/core/v8/DictionarySequenceOrDictionary.h" #include "bindings/core/v8/V8BindingForTesting.h" @@ -17,8 +19,7 @@ #include "core/dom/Document.h" #include "core/testing/DummyPageHolder.h" #include "testing/gtest/include/gtest/gtest.h" -#include <memory> -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/animation/TimingInputTest.cpp b/third_party/WebKit/Source/core/animation/TimingInputTest.cpp index 63ddd6e..de16c66 100644 --- a/third_party/WebKit/Source/core/animation/TimingInputTest.cpp +++ b/third_party/WebKit/Source/core/animation/TimingInputTest.cpp
@@ -10,7 +10,7 @@ #include "core/animation/AnimationTestHelper.h" #include "core/testing/DummyPageHolder.h" #include "testing/gtest/include/gtest/gtest.h" -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp index cf7ce8b8..2052be42 100644 --- a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp +++ b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
@@ -8,8 +8,8 @@ #include "core/css/CSSFontFace.h" #include "core/css/CSSFontSelector.h" #include "core/dom/Document.h" +#include "core/frame/LocalFrameClient.h" #include "core/inspector/ConsoleMessage.h" -#include "core/loader/FrameLoaderClient.h" #include "core/page/NetworkStateNotifier.h" #include "platform/Histogram.h" #include "platform/RuntimeEnabledFeatures.h"
diff --git a/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp b/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp index cd8f8e0..0a7498d0 100644 --- a/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp +++ b/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp
@@ -37,7 +37,7 @@ #include "core/dom/StyleEngine.h" #include "core/dom/TaskRunnerHelper.h" #include "core/frame/LocalFrame.h" -#include "core/loader/FrameLoaderClient.h" +#include "core/frame/LocalFrameClient.h" #include "core/style/StyleRareNonInheritedData.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/dom/DOMTypedArray.h b/third_party/WebKit/Source/core/dom/DOMTypedArray.h index 9dff983..773443ce 100644 --- a/third_party/WebKit/Source/core/dom/DOMTypedArray.h +++ b/third_party/WebKit/Source/core/dom/DOMTypedArray.h
@@ -9,6 +9,7 @@ #include "core/CoreExport.h" #include "core/dom/DOMArrayBufferView.h" #include "core/dom/DOMSharedArrayBuffer.h" +#include "v8/include/v8.h" #include "wtf/typed_arrays/Float32Array.h" #include "wtf/typed_arrays/Float64Array.h" #include "wtf/typed_arrays/Int16Array.h" @@ -18,7 +19,6 @@ #include "wtf/typed_arrays/Uint32Array.h" #include "wtf/typed_arrays/Uint8Array.h" #include "wtf/typed_arrays/Uint8ClampedArray.h" -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp index d8fc1a43..39cc41e 100644 --- a/third_party/WebKit/Source/core/dom/Document.cpp +++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -145,6 +145,7 @@ #include "core/frame/HostsUsingFeatures.h" #include "core/frame/LocalDOMWindow.h" #include "core/frame/LocalFrame.h" +#include "core/frame/LocalFrameClient.h" #include "core/frame/PerformanceMonitor.h" #include "core/frame/Settings.h" #include "core/frame/csp/ContentSecurityPolicy.h" @@ -196,7 +197,6 @@ #include "core/loader/DocumentLoader.h" #include "core/loader/FrameFetchContext.h" #include "core/loader/FrameLoader.h" -#include "core/loader/FrameLoaderClient.h" #include "core/loader/ImageLoader.h" #include "core/loader/NavigationScheduler.h" #include "core/loader/PrerendererClient.h" @@ -410,7 +410,6 @@ public NetworkStateNotifier::NetworkStateObserver, public ContextLifecycleObserver { USING_GARBAGE_COLLECTED_MIXIN(Document::NetworkStateObserver); - EAGERLY_FINALIZE(); public: explicit NetworkStateObserver(Document& document) @@ -420,9 +419,6 @@ TaskRunnerHelper::get(TaskType::Networking, getExecutionContext())); } - // We eagerly finalize, so it's safe to touch getExecutionContext() here. - ~NetworkStateObserver() { unregisterAsObserver(getExecutionContext()); } - void onLineStateChange(bool onLine) override { AtomicString eventName = onLine ? EventTypeNames::online : EventTypeNames::offline; @@ -438,8 +434,7 @@ } void unregisterAsObserver(ExecutionContext* context) { - if (!context) - return; + DCHECK(context); networkStateNotifier().removeOnLineObserver( this, TaskRunnerHelper::get(TaskType::Networking, context)); } @@ -539,8 +534,7 @@ m_nodeCount(0), m_wouldLoadReason(Created), m_passwordCount(0), - m_engagementLevel(mojom::blink::EngagementLevel::NONE), - m_networkStateObserver(new NetworkStateObserver(*this)) { + m_engagementLevel(mojom::blink::EngagementLevel::NONE) { if (m_frame) { DCHECK(m_frame->page()); provideContextFeaturesToDocumentFrom(*this, *m_frame->page()); @@ -2450,6 +2444,11 @@ if (view()) view()->didAttachDocument(); + + // Observer(s) should not be initialized until the document is initialized / + // attached to a frame. Otherwise ContextLifecycleObserver::contextDestroyed + // wouldn't be fired. + m_networkStateObserver = new NetworkStateObserver(*this); } void Document::shutdown() { @@ -5632,7 +5631,7 @@ DCHECK(frame()) << "you are querying canExecuteScripts on a non contextDocument."; - FrameLoaderClient* client = frame()->loader().client(); + LocalFrameClient* client = frame()->loader().client(); if (!client) return false;
diff --git a/third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h b/third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h index f8b99021..ee76484 100644 --- a/third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h +++ b/third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h
@@ -7,7 +7,7 @@ #include "core/dom/Document.h" #include "core/frame/LocalFrame.h" -#include "core/loader/FrameLoaderClient.h" +#include "core/frame/LocalFrameClient.h" #include "platform/UserGestureIndicator.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/dom/ElementVisibilityObserverTest.cpp b/third_party/WebKit/Source/core/dom/ElementVisibilityObserverTest.cpp index efff024..0d644537 100644 --- a/third_party/WebKit/Source/core/dom/ElementVisibilityObserverTest.cpp +++ b/third_party/WebKit/Source/core/dom/ElementVisibilityObserverTest.cpp
@@ -17,7 +17,7 @@ namespace { -// Stub implementation of FrameLoaderClient for the purpose of testing. It will +// Stub implementation of LocalFrameClient for the purpose of testing. It will // alow callers to set the parent/top frames by calling |setParent|. It is used // in ElementVisibilityObserverTest in order to mock a RemoteFrame parent of a // LocalFrame.
diff --git a/third_party/WebKit/Source/core/editing/SelectionModifier.cpp b/third_party/WebKit/Source/core/editing/SelectionModifier.cpp index 62290af..bf2ba830 100644 --- a/third_party/WebKit/Source/core/editing/SelectionModifier.cpp +++ b/third_party/WebKit/Source/core/editing/SelectionModifier.cpp
@@ -739,14 +739,10 @@ m_selection.affinity()); xPos = lineDirectionPointForBlockDirectionNavigation( direction == FrameSelection::DirectionUp ? START : END); - m_selection.setAffinity(direction == FrameSelection::DirectionUp - ? TextAffinity::Upstream - : TextAffinity::Downstream); break; case FrameSelection::AlterationExtend: pos = createVisiblePosition(m_selection.extent(), m_selection.affinity()); xPos = lineDirectionPointForBlockDirectionNavigation(EXTENT); - m_selection.setAffinity(TextAffinity::Downstream); break; } @@ -789,6 +785,9 @@ SelectionInDOMTree::Builder() .collapse(result.toPositionWithAffinity()) .setIsDirectional(shouldAlwaysUseDirectionalSelection(frame())) + .setAffinity(direction == FrameSelection::DirectionUp + ? TextAffinity::Upstream + : TextAffinity::Downstream) .build()); break; case FrameSelection::AlterationExtend: {
diff --git a/third_party/WebKit/Source/core/editing/VisibleSelection.h b/third_party/WebKit/Source/core/editing/VisibleSelection.h index d7fa3bb..bf7f19e1 100644 --- a/third_party/WebKit/Source/core/editing/VisibleSelection.h +++ b/third_party/WebKit/Source/core/editing/VisibleSelection.h
@@ -63,7 +63,6 @@ SelectionType getSelectionType() const { return m_selectionType; } - void setAffinity(TextAffinity affinity) { m_affinity = affinity; } TextAffinity affinity() const { return m_affinity; } // TODO(yosin): To make |VisibleSelection| as immutable object, we should
diff --git a/third_party/WebKit/Source/core/events/ErrorEvent.cpp b/third_party/WebKit/Source/core/events/ErrorEvent.cpp index c618020..1844ee3 100644 --- a/third_party/WebKit/Source/core/events/ErrorEvent.cpp +++ b/third_party/WebKit/Source/core/events/ErrorEvent.cpp
@@ -30,9 +30,10 @@ #include "core/events/ErrorEvent.h" -#include "bindings/core/v8/V8Binding.h" #include <memory> -#include <v8.h> + +#include "bindings/core/v8/V8Binding.h" +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/frame/FrameClient.h b/third_party/WebKit/Source/core/frame/FrameClient.h index 6b8af79..2beff90 100644 --- a/third_party/WebKit/Source/core/frame/FrameClient.h +++ b/third_party/WebKit/Source/core/frame/FrameClient.h
@@ -18,7 +18,7 @@ public: virtual bool inShadowTree() const = 0; - // TODO(dcheng): Move this into FrameLoaderClient, since remote frames don't + // TODO(dcheng): Move this into LocalFrameClient, since remote frames don't // need this. virtual void willBeDetached() = 0; virtual void detached(FrameDetachType) = 0;
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp index 85a05ad..ff0d2e0 100644 --- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp +++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -167,7 +167,7 @@ static void updateSuddenTerminationStatus( LocalDOMWindow* domWindow, bool addedListener, - FrameLoaderClient::SuddenTerminationDisablerType disablerType) { + LocalFrameClient::SuddenTerminationDisablerType disablerType) { Platform::current()->suddenTerminationChanged(!addedListener); if (domWindow->frame() && domWindow->frame()->loader().client()) domWindow->frame()->loader().client()->suddenTerminationDisablerChanged( @@ -188,9 +188,10 @@ static void addUnloadEventListener(LocalDOMWindow* domWindow) { DOMWindowSet& set = windowsWithUnloadEventListeners(); - if (set.isEmpty()) + if (set.isEmpty()) { updateSuddenTerminationStatus(domWindow, true, - FrameLoaderClient::UnloadHandler); + LocalFrameClient::UnloadHandler); + } set.add(domWindow); } @@ -201,9 +202,10 @@ if (it == set.end()) return; set.remove(it); - if (set.isEmpty()) + if (set.isEmpty()) { updateSuddenTerminationStatus(domWindow, false, - FrameLoaderClient::UnloadHandler); + LocalFrameClient::UnloadHandler); + } } static void removeAllUnloadEventListeners(LocalDOMWindow* domWindow) { @@ -212,16 +214,18 @@ if (it == set.end()) return; set.removeAll(it); - if (set.isEmpty()) + if (set.isEmpty()) { updateSuddenTerminationStatus(domWindow, false, - FrameLoaderClient::UnloadHandler); + LocalFrameClient::UnloadHandler); + } } static void addBeforeUnloadEventListener(LocalDOMWindow* domWindow) { DOMWindowSet& set = windowsWithBeforeUnloadEventListeners(); - if (set.isEmpty()) + if (set.isEmpty()) { updateSuddenTerminationStatus(domWindow, true, - FrameLoaderClient::BeforeUnloadHandler); + LocalFrameClient::BeforeUnloadHandler); + } set.add(domWindow); } @@ -232,9 +236,10 @@ if (it == set.end()) return; set.remove(it); - if (set.isEmpty()) + if (set.isEmpty()) { updateSuddenTerminationStatus(domWindow, false, - FrameLoaderClient::BeforeUnloadHandler); + LocalFrameClient::BeforeUnloadHandler); + } } static void removeAllBeforeUnloadEventListeners(LocalDOMWindow* domWindow) { @@ -243,9 +248,10 @@ if (it == set.end()) return; set.removeAll(it); - if (set.isEmpty()) + if (set.isEmpty()) { updateSuddenTerminationStatus(domWindow, false, - FrameLoaderClient::BeforeUnloadHandler); + LocalFrameClient::BeforeUnloadHandler); + } } static bool allowsBeforeUnloadListeners(LocalDOMWindow* window) {
diff --git a/third_party/WebKit/Source/core/frame/PerformanceMonitor.h b/third_party/WebKit/Source/core/frame/PerformanceMonitor.h index 4d74e28..46fba98c 100644 --- a/third_party/WebKit/Source/core/frame/PerformanceMonitor.h +++ b/third_party/WebKit/Source/core/frame/PerformanceMonitor.h
@@ -9,8 +9,8 @@ #include "platform/heap/Handle.h" #include "public/platform/WebThread.h" #include "public/platform/scheduler/base/task_time_observer.h" +#include "v8/include/v8.h" #include "wtf/text/AtomicString.h" -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/core/frame/UseCounter.h b/third_party/WebKit/Source/core/frame/UseCounter.h index 1a3d334..e23782d 100644 --- a/third_party/WebKit/Source/core/frame/UseCounter.h +++ b/third_party/WebKit/Source/core/frame/UseCounter.h
@@ -26,13 +26,13 @@ #ifndef UseCounter_h #define UseCounter_h -#include <v8.h> #include "core/CSSPropertyNames.h" #include "core/CoreExport.h" #include "core/css/parser/CSSParserMode.h" #include "platform/heap/GarbageCollected.h" #include "platform/heap/HeapAllocator.h" #include "platform/weborigin/KURL.h" +#include "v8/include/v8.h" #include "wtf/BitVector.h" #include "wtf/Noncopyable.h" #include "wtf/text/WTFString.h"
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp index 7ab2325..b520cb0 100644 --- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -28,8 +28,9 @@ #include "core/html/HTMLCanvasElement.h" #include <math.h> -#include <v8.h> + #include <memory> + #include "bindings/core/v8/ExceptionMessages.h" #include "bindings/core/v8/ExceptionState.h" #include "bindings/core/v8/ScriptController.h" @@ -79,6 +80,7 @@ #include "platform/transforms/AffineTransform.h" #include "public/platform/Platform.h" #include "public/platform/WebTraceLocation.h" +#include "v8/include/v8.h" #include "wtf/CheckedNumeric.h" #include "wtf/PtrUtil.h"
diff --git a/third_party/WebKit/Source/core/html/HTMLPlugInElement.h b/third_party/WebKit/Source/core/html/HTMLPlugInElement.h index b88a672..69d35f2 100644 --- a/third_party/WebKit/Source/core/html/HTMLPlugInElement.h +++ b/third_party/WebKit/Source/core/html/HTMLPlugInElement.h
@@ -27,8 +27,7 @@ #include "bindings/core/v8/SharedPersistent.h" #include "core/CoreExport.h" #include "core/html/HTMLFrameOwnerElement.h" - -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp index 11d9b6d4..71c3c6fa 100644 --- a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp +++ b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
@@ -30,6 +30,8 @@ #include "core/imagebitmap/ImageBitmapFactories.h" +#include <memory> + #include "bindings/core/v8/ExceptionState.h" #include "core/dom/DOMException.h" #include "core/dom/ExecutionContext.h" @@ -52,8 +54,7 @@ #include "public/platform/Platform.h" #include "public/platform/WebThread.h" #include "public/platform/WebTraceLocation.h" -#include <memory> -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/inspector/InspectorTaskRunner.h b/third_party/WebKit/Source/core/inspector/InspectorTaskRunner.h index 357a7b0b..ae1311df 100644 --- a/third_party/WebKit/Source/core/inspector/InspectorTaskRunner.h +++ b/third_party/WebKit/Source/core/inspector/InspectorTaskRunner.h
@@ -6,13 +6,13 @@ #define InspectorTaskRunner_h #include "core/CoreExport.h" +#include "v8/include/v8.h" #include "wtf/Allocator.h" #include "wtf/Deque.h" #include "wtf/Forward.h" #include "wtf/Functional.h" #include "wtf/Noncopyable.h" #include "wtf/ThreadingPrimitives.h" -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp b/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp index 21d29b5..0bc9448 100644 --- a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp +++ b/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
@@ -4,6 +4,10 @@ #include "core/inspector/InspectorTraceEvents.h" +#include <inttypes.h> + +#include <memory> + #include "bindings/core/v8/ScriptSourceCode.h" #include "bindings/core/v8/SourceLocation.h" #include "core/animation/Animation.h" @@ -32,12 +36,10 @@ #include "platform/network/ResourceRequest.h" #include "platform/network/ResourceResponse.h" #include "platform/weborigin/KURL.h" +#include "v8/include/v8-profiler.h" +#include "v8/include/v8.h" #include "wtf/Vector.h" #include "wtf/text/TextPosition.h" -#include <inttypes.h> -#include <memory> -#include <v8-profiler.h> -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp index 2cb4eec..d0505d4 100644 --- a/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp +++ b/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp
@@ -45,7 +45,7 @@ #include "core/workers/WorkerGlobalScope.h" #include "core/workers/WorkerReportingProxy.h" #include "core/workers/WorkerThread.h" -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp b/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp index edd0450..d6677f4 100644 --- a/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp
@@ -41,15 +41,15 @@ return client; } -RenderingTest::RenderingTest(FrameLoaderClient* frameLoaderClient) - : m_frameLoaderClient(frameLoaderClient) {} +RenderingTest::RenderingTest(LocalFrameClient* localFrameClient) + : m_localFrameClient(localFrameClient) {} void RenderingTest::SetUp() { Page::PageClients pageClients; fillWithEmptyClients(pageClients); pageClients.chromeClient = &chromeClient(); m_pageHolder = DummyPageHolder::create( - IntSize(800, 600), &pageClients, m_frameLoaderClient, settingOverrider()); + IntSize(800, 600), &pageClients, m_localFrameClient, settingOverrider()); Settings::setMockScrollbarsEnabled(true); RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(true);
diff --git a/third_party/WebKit/Source/core/layout/LayoutTestHelper.h b/third_party/WebKit/Source/core/layout/LayoutTestHelper.h index 24064c58..59d3fd81 100644 --- a/third_party/WebKit/Source/core/layout/LayoutTestHelper.h +++ b/third_party/WebKit/Source/core/layout/LayoutTestHelper.h
@@ -33,7 +33,7 @@ EmptyLocalFrameClient::trace(visitor); } - // FrameLoaderClient overrides: + // LocalFrameClient overrides: LocalFrame* firstChild() const override { return m_child.get(); } LocalFrame* createFrame(const FrameLoadRequest&, const AtomicString& name, @@ -117,7 +117,7 @@ void loadAhem(); private: - Persistent<FrameLoaderClient> m_frameLoaderClient; + Persistent<LocalFrameClient> m_localFrameClient; std::unique_ptr<DummyPageHolder> m_pageHolder; };
diff --git a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp index 9c4a02e..18e23bf5 100644 --- a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp +++ b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
@@ -36,11 +36,11 @@ #include "core/dom/TaskRunnerHelper.h" #include "core/frame/FrameConsole.h" #include "core/frame/LocalFrame.h" +#include "core/frame/LocalFrameClient.h" #include "core/inspector/InspectorInstrumentation.h" #include "core/inspector/InspectorTraceEvents.h" #include "core/loader/DocumentThreadableLoaderClient.h" #include "core/loader/FrameLoader.h" -#include "core/loader/FrameLoaderClient.h" #include "core/loader/ThreadableLoaderClient.h" #include "core/loader/private/CrossOriginPreflightResultCache.h" #include "core/page/ChromeClient.h" @@ -456,7 +456,7 @@ } // FIXME: This error is sent to the client in didFail(), so it should not be - // an internal one. Use FrameLoaderClient::cancelledError() instead. + // an internal one. Use LocalFrameClient::cancelledError() instead. ResourceError error(errorDomainBlinkInternal, 0, resource()->url(), "Load cancelled"); error.setIsCancellation(true); @@ -933,7 +933,7 @@ DCHECK(m_client); // Using values from net/base/net_error_list.h ERR_TIMED_OUT, Same as existing - // FIXME above - this error should be coming from FrameLoaderClient to be + // FIXME above - this error should be coming from LocalFrameClient to be // identifiable. static const int timeoutError = -7; ResourceError error("net", timeoutError, resource()->url(), String());
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp index 31c5c3d4..4872586f 100644 --- a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp +++ b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
@@ -188,7 +188,7 @@ }; // This test class sets up a mock frame loader client. -class FrameFetchContextMockedFrameLoaderClientTest +class FrameFetchContextMockedLocalFrameClientTest : public FrameFetchContextTest { protected: void SetUp() override { @@ -712,7 +712,7 @@ // Tests that the embedder gets correct notification when a resource is loaded // from the memory cache. -TEST_F(FrameFetchContextMockedFrameLoaderClientTest, +TEST_F(FrameFetchContextMockedLocalFrameClientTest, DispatchDidLoadResourceFromMemoryCache) { ResourceRequest resourceRequest(url); Resource* resource = MockResource::create(resourceRequest); @@ -732,7 +732,7 @@ // Tests that when a resource with certificate errors is loaded from the memory // cache, the embedder is notified. -TEST_F(FrameFetchContextMockedFrameLoaderClientTest, +TEST_F(FrameFetchContextMockedLocalFrameClientTest, MemoryCacheCertificateError) { ResourceRequest resourceRequest(url); ResourceResponse response;
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp index 23cfc31..c727b4e 100644 --- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp +++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -54,6 +54,7 @@ #include "core/frame/FrameView.h" #include "core/frame/LocalDOMWindow.h" #include "core/frame/LocalFrame.h" +#include "core/frame/LocalFrameClient.h" #include "core/frame/Settings.h" #include "core/frame/VisualViewport.h" #include "core/frame/csp/ContentSecurityPolicy.h" @@ -68,7 +69,6 @@ #include "core/loader/DocumentLoader.h" #include "core/loader/FormSubmission.h" #include "core/loader/FrameLoadRequest.h" -#include "core/loader/FrameLoaderClient.h" #include "core/loader/LinkLoader.h" #include "core/loader/MixedContentChecker.h" #include "core/loader/NavigationScheduler.h" @@ -236,8 +236,8 @@ takeObjectSnapshot(); } -FrameLoaderClient* FrameLoader::client() const { - return static_cast<FrameLoaderClient*>(m_frame->client()); +LocalFrameClient* FrameLoader::client() const { + return static_cast<LocalFrameClient*>(m_frame->client()); } void FrameLoader::setDefersLoading(bool defers) {
diff --git a/third_party/WebKit/Source/core/loader/FrameLoaderClient.h b/third_party/WebKit/Source/core/loader/FrameLoaderClient.h deleted file mode 100644 index d38a8e8..0000000 --- a/third_party/WebKit/Source/core/loader/FrameLoaderClient.h +++ /dev/null
@@ -1,45 +0,0 @@ -/* - * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights - * reserved. - * Copyright (C) 2012 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef FrameLoaderClient_h -#define FrameLoaderClient_h - -#include "core/frame/LocalFrameClient.h" - -namespace blink { - -// TODO(slangley): Remove this file once all users are including -// LocalFrameClient.h instead. - -using FrameLoaderClient = LocalFrameClient; - -} // namespace blink - -#endif // FrameLoaderClient_h
diff --git a/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp b/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp index 4d7d6e70..a89c1cfe 100644 --- a/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp +++ b/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
@@ -31,12 +31,12 @@ #include "core/dom/Document.h" #include "core/frame/Frame.h" #include "core/frame/LocalFrame.h" +#include "core/frame/LocalFrameClient.h" #include "core/frame/Settings.h" #include "core/frame/UseCounter.h" #include "core/inspector/ConsoleMessage.h" #include "core/loader/DocumentLoader.h" #include "core/loader/FrameLoader.h" -#include "core/loader/FrameLoaderClient.h" #include "platform/RuntimeEnabledFeatures.h" #include "platform/network/NetworkUtils.h" #include "platform/weborigin/SchemeRegistry.h" @@ -315,7 +315,7 @@ Settings* settings = mixedFrame->settings(); // Use the current local frame's client; the embedder doesn't distinguish // mixed content signals from different frames on the same page. - FrameLoaderClient* client = frame->loader().client(); + LocalFrameClient* client = frame->loader().client(); SecurityOrigin* securityOrigin = mixedFrame->securityContext()->getSecurityOrigin(); bool allowed = false; @@ -442,7 +442,7 @@ Settings* settings = mixedFrame->settings(); // Use the current local frame's client; the embedder doesn't distinguish // mixed content signals from different frames on the same page. - FrameLoaderClient* client = frame->loader().client(); + LocalFrameClient* client = frame->loader().client(); SecurityOrigin* securityOrigin = mixedFrame->securityContext()->getSecurityOrigin(); bool allowed = false; @@ -553,7 +553,7 @@ // Use the current local frame's client; the embedder doesn't distinguish // mixed content signals from different frames on the same page. - FrameLoaderClient* client = frame->loader().client(); + LocalFrameClient* client = frame->loader().client(); bool strictMixedContentCheckingForPlugin = effectiveFrame->settings() && effectiveFrame->settings()->getStrictMixedContentCheckingForPlugin();
diff --git a/third_party/WebKit/Source/core/loader/PingLoaderTest.cpp b/third_party/WebKit/Source/core/loader/PingLoaderTest.cpp index 106ade6..8406bdc 100644 --- a/third_party/WebKit/Source/core/loader/PingLoaderTest.cpp +++ b/third_party/WebKit/Source/core/loader/PingLoaderTest.cpp
@@ -20,7 +20,7 @@ namespace { -class PingFrameLoaderClient : public EmptyLocalFrameClient { +class PingLocalFrameClient : public EmptyLocalFrameClient { public: void dispatchWillSendRequest(ResourceRequest& request) override { if (request.httpContentType() == "text/ping") @@ -36,7 +36,7 @@ class PingLoaderTest : public ::testing::Test { public: void SetUp() override { - m_client = new PingFrameLoaderClient; + m_client = new PingLocalFrameClient; m_pageHolder = DummyPageHolder::create(IntSize(1, 1), nullptr, m_client); } @@ -73,7 +73,7 @@ } private: - Persistent<PingFrameLoaderClient> m_client; + Persistent<PingLocalFrameClient> m_client; std::unique_ptr<DummyPageHolder> m_pageHolder; };
diff --git a/third_party/WebKit/Source/core/loader/resource/ImageResource.cpp b/third_party/WebKit/Source/core/loader/resource/ImageResource.cpp index 8e51801e..ea4544d 100644 --- a/third_party/WebKit/Source/core/loader/resource/ImageResource.cpp +++ b/third_party/WebKit/Source/core/loader/resource/ImageResource.cpp
@@ -23,6 +23,8 @@ #include "core/loader/resource/ImageResource.h" +#include <memory> + #include "core/loader/resource/ImageResourceContent.h" #include "core/loader/resource/ImageResourceInfo.h" #include "platform/Histogram.h" @@ -35,10 +37,9 @@ #include "platform/loader/fetch/ResourceLoader.h" #include "platform/loader/fetch/ResourceLoadingLog.h" #include "public/platform/Platform.h" +#include "v8/include/v8.h" #include "wtf/CurrentTime.h" #include "wtf/StdLibExtras.h" -#include <memory> -#include <v8.h> namespace blink { namespace {
diff --git a/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp b/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp index 7d4ac89..740fe8f 100644 --- a/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp +++ b/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp
@@ -4,6 +4,8 @@ #include "core/loader/resource/ImageResourceContent.h" +#include <memory> + #include "core/loader/resource/ImageResource.h" #include "core/loader/resource/ImageResourceInfo.h" #include "core/loader/resource/ImageResourceObserver.h" @@ -15,10 +17,9 @@ #include "platform/graphics/BitmapImage.h" #include "platform/graphics/PlaceholderImage.h" #include "platform/instrumentation/tracing/TraceEvent.h" +#include "v8/include/v8.h" #include "wtf/StdLibExtras.h" #include "wtf/Vector.h" -#include <memory> -#include <v8.h> namespace blink { namespace {
diff --git a/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp b/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp index 6e4844d..6f9317a 100644 --- a/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp +++ b/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp
@@ -20,11 +20,10 @@ #include "public/platform/WebOriginTrialTokenStatus.h" #include "public/platform/WebSecurityOrigin.h" #include "public/platform/WebTrialTokenValidator.h" +#include "v8/include/v8.h" #include "wtf/Vector.h" #include "wtf/text/StringBuilder.h" -#include <v8.h> - namespace blink { namespace {
diff --git a/third_party/WebKit/Source/core/page/PrintContextTest.cpp b/third_party/WebKit/Source/core/page/PrintContextTest.cpp index 26bb950..b0772f9 100644 --- a/third_party/WebKit/Source/core/page/PrintContextTest.cpp +++ b/third_party/WebKit/Source/core/page/PrintContextTest.cpp
@@ -73,8 +73,8 @@ class PrintContextTest : public RenderingTest { protected: - explicit PrintContextTest(FrameLoaderClient* frameLoaderClient = nullptr) - : RenderingTest(frameLoaderClient) {} + explicit PrintContextTest(LocalFrameClient* localFrameClient = nullptr) + : RenderingTest(localFrameClient) {} void SetUp() override { RenderingTest::SetUp();
diff --git a/third_party/WebKit/Source/core/paint/VideoPainterTest.cpp b/third_party/WebKit/Source/core/paint/VideoPainterTest.cpp index 1e649de57..2d62267 100644 --- a/third_party/WebKit/Source/core/paint/VideoPainterTest.cpp +++ b/third_party/WebKit/Source/core/paint/VideoPainterTest.cpp
@@ -81,7 +81,7 @@ class StubLocalFrameClient : public EmptyLocalFrameClient { public: - // FrameLoaderClient + // LocalFrameClient std::unique_ptr<WebMediaPlayer> createWebMediaPlayer( HTMLMediaElement&, const WebMediaPlayerSource&,
diff --git a/third_party/WebKit/Source/core/plugins/BUILD.gn b/third_party/WebKit/Source/core/plugins/BUILD.gn index bbd784caf..c53b41a0 100644 --- a/third_party/WebKit/Source/core/plugins/BUILD.gn +++ b/third_party/WebKit/Source/core/plugins/BUILD.gn
@@ -8,4 +8,7 @@ sources = [ "PluginView.h", ] + deps = [ + "//v8", + ] }
diff --git a/third_party/WebKit/Source/core/plugins/PluginView.h b/third_party/WebKit/Source/core/plugins/PluginView.h index 2c4f3f3..0f799cb 100644 --- a/third_party/WebKit/Source/core/plugins/PluginView.h +++ b/third_party/WebKit/Source/core/plugins/PluginView.h
@@ -31,8 +31,8 @@ #include "core/CoreExport.h" #include "platform/Widget.h" #include "platform/scroll/ScrollTypes.h" +#include "v8/include/v8.h" #include "wtf/text/WTFString.h" -#include <v8.h> namespace blink { class WebLayer;
diff --git a/third_party/WebKit/Source/core/streams/ReadableStreamController.h b/third_party/WebKit/Source/core/streams/ReadableStreamController.h index b2a9ef2..5766ea4 100644 --- a/third_party/WebKit/Source/core/streams/ReadableStreamController.h +++ b/third_party/WebKit/Source/core/streams/ReadableStreamController.h
@@ -11,8 +11,8 @@ #include "bindings/core/v8/V8ScriptRunner.h" #include "core/CoreExport.h" #include "platform/heap/Handle.h" +#include "v8/include/v8.h" #include "wtf/RefPtr.h" -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/core/streams/ReadableStreamOperations.h b/third_party/WebKit/Source/core/streams/ReadableStreamOperations.h index 841681fe..902be31 100644 --- a/third_party/WebKit/Source/core/streams/ReadableStreamOperations.h +++ b/third_party/WebKit/Source/core/streams/ReadableStreamOperations.h
@@ -7,7 +7,7 @@ #include "bindings/core/v8/ScriptPromise.h" #include "bindings/core/v8/ScriptValue.h" -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/streams/ReadableStreamOperationsTest.cpp b/third_party/WebKit/Source/core/streams/ReadableStreamOperationsTest.cpp index 41c4403c..cae61866 100644 --- a/third_party/WebKit/Source/core/streams/ReadableStreamOperationsTest.cpp +++ b/third_party/WebKit/Source/core/streams/ReadableStreamOperationsTest.cpp
@@ -18,7 +18,7 @@ #include "core/streams/UnderlyingSourceBase.h" #include "platform/heap/Handle.h" #include "testing/gtest/include/gtest/gtest.h" -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.cpp b/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.cpp index 2213336..1e0e4822 100644 --- a/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.cpp +++ b/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.cpp
@@ -8,7 +8,7 @@ #include "bindings/core/v8/ScriptState.h" #include "bindings/core/v8/ScriptValue.h" #include "core/streams/ReadableStreamController.h" -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp b/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp index e0d5903..b5b6a933 100644 --- a/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp +++ b/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp
@@ -46,17 +46,17 @@ std::unique_ptr<DummyPageHolder> DummyPageHolder::create( const IntSize& initialViewSize, Page::PageClients* pageClients, - FrameLoaderClient* frameLoaderClient, + LocalFrameClient* localFrameClient, FrameSettingOverrideFunction settingOverrider, InterfaceProvider* interfaceProvider) { - return WTF::wrapUnique( - new DummyPageHolder(initialViewSize, pageClients, frameLoaderClient, - settingOverrider, interfaceProvider)); + return WTF::wrapUnique(new DummyPageHolder(initialViewSize, pageClients, + localFrameClient, settingOverrider, + interfaceProvider)); } DummyPageHolder::DummyPageHolder(const IntSize& initialViewSize, Page::PageClients* pageClientsArgument, - FrameLoaderClient* frameLoaderClient, + LocalFrameClient* localFrameClient, FrameSettingOverrideFunction settingOverrider, InterfaceProvider* interfaceProvider) { Page::PageClients pageClients; @@ -76,11 +76,11 @@ if (settingOverrider) (*settingOverrider)(settings); - m_frameLoaderClient = frameLoaderClient; - if (!m_frameLoaderClient) - m_frameLoaderClient = EmptyLocalFrameClient::create(); + m_localFrameClient = localFrameClient; + if (!m_localFrameClient) + m_localFrameClient = EmptyLocalFrameClient::create(); - m_frame = LocalFrame::create(m_frameLoaderClient.get(), &m_page->frameHost(), + m_frame = LocalFrame::create(m_localFrameClient.get(), &m_page->frameHost(), nullptr, interfaceProvider); m_frame->setView(FrameView::create(*m_frame, initialViewSize)); m_frame->view()->page()->frameHost().visualViewport().setSize(
diff --git a/third_party/WebKit/Source/core/testing/DummyPageHolder.h b/third_party/WebKit/Source/core/testing/DummyPageHolder.h index 1be5ce9..2a6aa57 100644 --- a/third_party/WebKit/Source/core/testing/DummyPageHolder.h +++ b/third_party/WebKit/Source/core/testing/DummyPageHolder.h
@@ -31,13 +31,13 @@ #ifndef DummyPageHolder_h #define DummyPageHolder_h -#include "core/loader/FrameLoaderClient.h" +#include <memory> +#include "core/frame/LocalFrameClient.h" #include "core/page/Page.h" #include "platform/geometry/IntSize.h" #include "platform/heap/Handle.h" #include "wtf/Allocator.h" #include "wtf/Noncopyable.h" -#include <memory> namespace blink { @@ -70,7 +70,7 @@ static std::unique_ptr<DummyPageHolder> create( const IntSize& initialViewSize = IntSize(), Page::PageClients* = 0, - FrameLoaderClient* = nullptr, + LocalFrameClient* = nullptr, FrameSettingOverrideFunction = nullptr, InterfaceProvider* = nullptr); ~DummyPageHolder(); @@ -83,7 +83,7 @@ private: DummyPageHolder(const IntSize& initialViewSize, Page::PageClients*, - FrameLoaderClient*, + LocalFrameClient*, FrameSettingOverrideFunction settingOverrider, InterfaceProvider* = nullptr); @@ -96,7 +96,7 @@ // TODO: rework the tests to not require cross-thread access. CrossThreadPersistent<LocalFrame> m_frame; - Persistent<FrameLoaderClient> m_frameLoaderClient; + Persistent<LocalFrameClient> m_localFrameClient; }; } // namespace blink
diff --git a/third_party/WebKit/Source/core/testing/GCObservation.h b/third_party/WebKit/Source/core/testing/GCObservation.h index d0b6fa7..32aed0a 100644 --- a/third_party/WebKit/Source/core/testing/GCObservation.h +++ b/third_party/WebKit/Source/core/testing/GCObservation.h
@@ -34,8 +34,7 @@ #include "bindings/core/v8/ScopedPersistent.h" #include "bindings/core/v8/ScriptWrappable.h" #include "platform/heap/Handle.h" - -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp index 981251a..30482ff 100644 --- a/third_party/WebKit/Source/core/testing/Internals.cpp +++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -26,6 +26,9 @@ #include "core/testing/Internals.h" +#include <deque> +#include <memory> + #include "bindings/core/v8/ExceptionMessages.h" #include "bindings/core/v8/ExceptionState.h" #include "bindings/core/v8/ScriptFunction.h" @@ -145,14 +148,12 @@ #include "public/platform/WebGraphicsContext3DProvider.h" #include "public/platform/WebLayer.h" #include "public/platform/modules/remoteplayback/WebRemotePlaybackAvailability.h" +#include "v8/include/v8.h" #include "wtf/InstanceCounter.h" #include "wtf/Optional.h" #include "wtf/PtrUtil.h" #include "wtf/dtoa.h" #include "wtf/text/StringBuffer.h" -#include <deque> -#include <memory> -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.h b/third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.h index 34e28c2..3da1a30c 100644 --- a/third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.h +++ b/third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.h
@@ -26,7 +26,7 @@ #ifndef WebCoreTestSupport_h #define WebCoreTestSupport_h -#include <v8.h> +#include "v8/include/v8.h" namespace WebCoreTestSupport {
diff --git a/third_party/WebKit/Source/core/timing/MemoryInfo.cpp b/third_party/WebKit/Source/core/timing/MemoryInfo.cpp index be531bb1..22535ff 100644 --- a/third_party/WebKit/Source/core/timing/MemoryInfo.cpp +++ b/third_party/WebKit/Source/core/timing/MemoryInfo.cpp
@@ -30,14 +30,15 @@ #include "core/timing/MemoryInfo.h" +#include <limits> + #include "core/frame/LocalFrame.h" #include "core/frame/Settings.h" #include "platform/RuntimeEnabledFeatures.h" +#include "v8/include/v8.h" #include "wtf/CurrentTime.h" #include "wtf/MathExtras.h" #include "wtf/ThreadSpecific.h" -#include <limits> -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/core/workers/WorkerBackingThread.h b/third_party/WebKit/Source/core/workers/WorkerBackingThread.h index 9ebbcc9..be08b11 100644 --- a/third_party/WebKit/Source/core/workers/WorkerBackingThread.h +++ b/third_party/WebKit/Source/core/workers/WorkerBackingThread.h
@@ -5,13 +5,14 @@ #ifndef WorkerBackingThread_h #define WorkerBackingThread_h +#include <memory> + #include "core/CoreExport.h" #include "platform/heap/ThreadState.h" +#include "v8/include/v8.h" #include "wtf/Forward.h" #include "wtf/PtrUtil.h" #include "wtf/ThreadingPrimitives.h" -#include <memory> -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/core/workers/WorkerThread.h b/third_party/WebKit/Source/core/workers/WorkerThread.h index d345b44e..6c27763 100644 --- a/third_party/WebKit/Source/core/workers/WorkerThread.h +++ b/third_party/WebKit/Source/core/workers/WorkerThread.h
@@ -27,6 +27,8 @@ #ifndef WorkerThread_h #define WorkerThread_h +#include <memory> + #include "core/CoreExport.h" #include "core/frame/csp/ContentSecurityPolicy.h" #include "core/workers/ParentFrameTaskRunners.h" @@ -36,11 +38,10 @@ #include "platform/WaitableEvent.h" #include "platform/WebTaskRunner.h" #include "public/platform/WebThread.h" +#include "v8/include/v8.h" #include "wtf/Forward.h" #include "wtf/Functional.h" #include "wtf/PassRefPtr.h" -#include <memory> -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h b/third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h index f93d0b8..765aa09 100644 --- a/third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h +++ b/third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <memory> + #include "bindings/core/v8/SourceLocation.h" #include "bindings/core/v8/V8CacheOptions.h" #include "bindings/core/v8/V8GCController.h" @@ -26,12 +28,11 @@ #include "platform/weborigin/SecurityOrigin.h" #include "public/platform/WebAddressSpace.h" #include "testing/gmock/include/gmock/gmock.h" +#include "v8/include/v8.h" #include "wtf/CurrentTime.h" #include "wtf/Forward.h" #include "wtf/PtrUtil.h" #include "wtf/Vector.h" -#include <memory> -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h b/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h index 47590a6..636b821f 100644 --- a/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h +++ b/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h
@@ -10,7 +10,7 @@ #include "core/css/CSSSyntaxDescriptor.h" #include "platform/geometry/IntSize.h" #include "platform/heap/Handle.h" -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/modules/csspaint/CSSPaintImageGeneratorImpl.h b/third_party/WebKit/Source/modules/csspaint/CSSPaintImageGeneratorImpl.h index b0f8a20b..0fff240 100644 --- a/third_party/WebKit/Source/modules/csspaint/CSSPaintImageGeneratorImpl.h +++ b/third_party/WebKit/Source/modules/csspaint/CSSPaintImageGeneratorImpl.h
@@ -9,7 +9,7 @@ #include "core/css/CSSPaintImageGenerator.h" #include "platform/geometry/IntSize.h" #include "platform/heap/Handle.h" -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h b/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h index 1bf7854..38ccd5a0 100644 --- a/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h +++ b/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h
@@ -5,6 +5,8 @@ #ifndef DataConsumerHandleTestUtil_h #define DataConsumerHandleTestUtil_h +#include <memory> + #include "bindings/core/v8/ScriptState.h" #include "core/testing/NullExecutionContext.h" #include "gin/public/isolate_holder.h" @@ -15,6 +17,9 @@ #include "public/platform/Platform.h" #include "public/platform/WebDataConsumerHandle.h" #include "public/platform/WebTraceLocation.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "v8/include/v8.h" #include "wtf/Deque.h" #include "wtf/Locker.h" #include "wtf/PtrUtil.h" @@ -22,10 +27,6 @@ #include "wtf/ThreadingPrimitives.h" #include "wtf/Vector.h" #include "wtf/text/StringBuilder.h" -#include <gmock/gmock.h> -#include <gtest/gtest.h> -#include <memory> -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/modules/fetch/ReadableStreamBytesConsumer.cpp b/third_party/WebKit/Source/modules/fetch/ReadableStreamBytesConsumer.cpp index 27f03ee..a213956 100644 --- a/third_party/WebKit/Source/modules/fetch/ReadableStreamBytesConsumer.cpp +++ b/third_party/WebKit/Source/modules/fetch/ReadableStreamBytesConsumer.cpp
@@ -4,6 +4,10 @@ #include "modules/fetch/ReadableStreamBytesConsumer.h" +#include <string.h> + +#include <algorithm> + #include "bindings/core/v8/ScopedPersistent.h" #include "bindings/core/v8/ScriptFunction.h" #include "bindings/core/v8/ScriptState.h" @@ -12,11 +16,9 @@ #include "bindings/core/v8/V8IteratorResultValue.h" #include "bindings/core/v8/V8Uint8Array.h" #include "core/streams/ReadableStreamOperations.h" +#include "v8/include/v8.h" #include "wtf/Assertions.h" #include "wtf/text/WTFString.h" -#include <algorithm> -#include <string.h> -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/modules/fetch/ReadableStreamBytesConsumerTest.cpp b/third_party/WebKit/Source/modules/fetch/ReadableStreamBytesConsumerTest.cpp index 9063d38..e1ae8677 100644 --- a/third_party/WebKit/Source/modules/fetch/ReadableStreamBytesConsumerTest.cpp +++ b/third_party/WebKit/Source/modules/fetch/ReadableStreamBytesConsumerTest.cpp
@@ -4,6 +4,8 @@ #include "modules/fetch/ReadableStreamBytesConsumer.h" +#include <memory> + #include "bindings/core/v8/ScriptState.h" #include "bindings/core/v8/V8BindingMacros.h" #include "bindings/core/v8/V8GCController.h" @@ -15,8 +17,7 @@ #include "platform/testing/UnitTestHelpers.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -#include <memory> -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp index 73ec8929..5b80168 100644 --- a/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp +++ b/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp
@@ -27,8 +27,6 @@ #include <memory> -#include <v8.h> - #include "bindings/core/v8/ExceptionState.h" #include "bindings/core/v8/ScriptState.h" #include "bindings/core/v8/SerializedScriptValueFactory.h" @@ -49,6 +47,7 @@ #include "public/platform/WebVector.h" #include "public/platform/modules/indexeddb/WebIDBKey.h" #include "public/platform/modules/indexeddb/WebIDBKeyRange.h" +#include "v8/include/v8.h" using blink::WebBlobInfo; using blink::WebIDBCallbacks;
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBRequestTest.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBRequestTest.cpp index 05c3f4a2..6238dbb3 100644 --- a/third_party/WebKit/Source/modules/indexeddb/IDBRequestTest.cpp +++ b/third_party/WebKit/Source/modules/indexeddb/IDBRequestTest.cpp
@@ -25,6 +25,8 @@ #include "modules/indexeddb/IDBRequest.h" +#include <memory> + #include "bindings/core/v8/ScriptState.h" #include "bindings/core/v8/V8Binding.h" #include "bindings/core/v8/V8BindingForTesting.h" @@ -40,11 +42,10 @@ #include "platform/SharedBuffer.h" #include "public/platform/modules/indexeddb/WebIDBCallbacks.h" #include "testing/gtest/include/gtest/gtest.h" +#include "v8/include/v8.h" #include "wtf/PassRefPtr.h" #include "wtf/Vector.h" #include "wtf/dtoa/utils.h" -#include <memory> -#include <v8.h> namespace blink { namespace {
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBTransactionTest.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBTransactionTest.cpp index 0e7cfea..5b11c15 100644 --- a/third_party/WebKit/Source/modules/indexeddb/IDBTransactionTest.cpp +++ b/third_party/WebKit/Source/modules/indexeddb/IDBTransactionTest.cpp
@@ -30,6 +30,8 @@ #include "modules/indexeddb/IDBTransaction.h" +#include <memory> + #include "bindings/core/v8/V8BindingForTesting.h" #include "core/dom/DOMException.h" #include "core/dom/Document.h" @@ -39,8 +41,7 @@ #include "modules/indexeddb/MockWebIDBDatabase.h" #include "platform/SharedBuffer.h" #include "testing/gtest/include/gtest/gtest.h" -#include <memory> -#include <v8.h> +#include "v8/include/v8.h" namespace blink { namespace {
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBValue.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBValue.cpp index ea394ac..1651071 100644 --- a/third_party/WebKit/Source/modules/indexeddb/IDBValue.cpp +++ b/third_party/WebKit/Source/modules/indexeddb/IDBValue.cpp
@@ -4,12 +4,11 @@ #include "modules/indexeddb/IDBValue.h" -#include <v8.h> - #include "bindings/core/v8/SerializedScriptValue.h" #include "platform/blob/BlobData.h" #include "public/platform/WebBlobInfo.h" #include "public/platform/modules/indexeddb/WebIDBValue.h" +#include "v8/include/v8.h" #include "wtf/PtrUtil.h" namespace blink {
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationAvailabilityTest.cpp b/third_party/WebKit/Source/modules/presentation/PresentationAvailabilityTest.cpp index 030c24dd..7d97fc06 100644 --- a/third_party/WebKit/Source/modules/presentation/PresentationAvailabilityTest.cpp +++ b/third_party/WebKit/Source/modules/presentation/PresentationAvailabilityTest.cpp
@@ -14,8 +14,8 @@ #include "platform/testing/URLTestHelpers.h" #include "platform/weborigin/KURL.h" #include "testing/gtest/include/gtest/gtest.h" +#include "v8/include/v8.h" #include "wtf/Vector.h" -#include <v8.h> namespace blink { namespace {
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp b/third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp index 94ef5791..4e03f2e 100644 --- a/third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp +++ b/third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp
@@ -4,6 +4,8 @@ #include "modules/presentation/PresentationReceiver.h" +#include <memory> + #include "bindings/core/v8/ScriptPromiseResolver.h" #include "bindings/core/v8/V8BindingForTesting.h" #include "core/frame/LocalFrame.h" @@ -16,8 +18,7 @@ #include "public/platform/modules/presentation/WebPresentationConnectionProxy.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -#include <memory> -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushMessageData.cpp b/third_party/WebKit/Source/modules/push_messaging/PushMessageData.cpp index 92a5eeb6..c1d0ab6 100644 --- a/third_party/WebKit/Source/modules/push_messaging/PushMessageData.cpp +++ b/third_party/WebKit/Source/modules/push_messaging/PushMessageData.cpp
@@ -4,6 +4,8 @@ #include "modules/push_messaging/PushMessageData.h" +#include <memory> + #include "bindings/core/v8/ExceptionState.h" #include "bindings/core/v8/ScriptState.h" #include "bindings/core/v8/V8Binding.h" @@ -11,10 +13,9 @@ #include "core/dom/DOMArrayBuffer.h" #include "core/fileapi/Blob.h" #include "platform/blob/BlobData.h" +#include "v8/include/v8.h" #include "wtf/Assertions.h" #include "wtf/text/TextEncoding.h" -#include <memory> -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/modules/sensor/SensorErrorEvent.cpp b/third_party/WebKit/Source/modules/sensor/SensorErrorEvent.cpp index 2a39eb4..2a5470ba 100644 --- a/third_party/WebKit/Source/modules/sensor/SensorErrorEvent.cpp +++ b/third_party/WebKit/Source/modules/sensor/SensorErrorEvent.cpp
@@ -5,7 +5,7 @@ #include "modules/sensor/SensorErrorEvent.h" #include "bindings/core/v8/V8Binding.h" -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp b/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp index 89e1c58..abde40f 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp +++ b/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp
@@ -18,9 +18,9 @@ #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h" #include "platform/RuntimeEnabledFeatures.h" #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h" +#include "v8/include/v8.h" #include "wtf/Assertions.h" #include "wtf/RefPtr.h" -#include <v8.h> namespace blink { namespace {
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp index f966a02..615342cc 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp +++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp
@@ -5,6 +5,9 @@ #include "modules/serviceworkers/ServiceWorkerContainer.h" +#include <memory> +#include <utility> + #include "bindings/core/v8/Dictionary.h" #include "bindings/core/v8/ScriptFunction.h" #include "bindings/core/v8/ScriptPromise.h" @@ -24,11 +27,9 @@ #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" #include "testing/gtest/include/gtest/gtest.h" +#include "v8/include/v8.h" #include "wtf/PtrUtil.h" #include "wtf/text/WTFString.h" -#include <memory> -#include <utility> -#include <v8.h> namespace blink { namespace {
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerError.h b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerError.h index c4e7feb5..b7b360f 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerError.h +++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerError.h
@@ -33,8 +33,7 @@ #include "platform/heap/Handle.h" #include "public/platform/modules/serviceworker/WebServiceWorkerError.h" - -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp b/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp index b02ff06..ef7c919 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp +++ b/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp
@@ -14,8 +14,8 @@ #include "platform/LayoutTestSupport.h" #include "public/platform/Platform.h" #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h" +#include "v8/include/v8.h" #include "wtf/Assertions.h" -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp b/third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp index decda185..fa3680d 100644 --- a/third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp +++ b/third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp
@@ -15,7 +15,7 @@ #include "public/platform/Platform.h" #include "services/device/public/interfaces/constants.mojom-blink.h" #include "third_party/icu/source/i18n/unicode/timezone.h" -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/modules/webaudio/BaseAudioContextTest.cpp b/third_party/WebKit/Source/modules/webaudio/BaseAudioContextTest.cpp index c143063..da241d0 100644 --- a/third_party/WebKit/Source/modules/webaudio/BaseAudioContextTest.cpp +++ b/third_party/WebKit/Source/modules/webaudio/BaseAudioContextTest.cpp
@@ -27,10 +27,10 @@ const char* const kCrossOriginMetric = "WebAudio.Autoplay.CrossOrigin"; -class MockCrossOriginFrameLoaderClient final : public EmptyLocalFrameClient { +class MockCrossOriginLocalFrameClient final : public EmptyLocalFrameClient { public: - static MockCrossOriginFrameLoaderClient* create(Frame* parent) { - return new MockCrossOriginFrameLoaderClient(parent); + static MockCrossOriginLocalFrameClient* create(Frame* parent) { + return new MockCrossOriginLocalFrameClient(parent); } DEFINE_INLINE_VIRTUAL_TRACE() { @@ -42,7 +42,7 @@ Frame* top() const override { return m_parent.get(); } private: - explicit MockCrossOriginFrameLoaderClient(Frame* parent) : m_parent(parent) {} + explicit MockCrossOriginLocalFrameClient(Frame* parent) : m_parent(parent) {} Member<Frame> m_parent; }; @@ -99,7 +99,7 @@ void createChildFrame() { m_childFrame = LocalFrame::create( - MockCrossOriginFrameLoaderClient::create(document().frame()), + MockCrossOriginLocalFrameClient::create(document().frame()), document().frame()->host(), m_dummyFrameOwner.get()); m_childFrame->setView(FrameView::create(*m_childFrame, IntSize(500, 500))); m_childFrame->init();
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp index 514c3cb..56aae3f 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -38,6 +38,7 @@ #include "core/dom/TaskRunnerHelper.h" #include "core/frame/ImageBitmap.h" #include "core/frame/LocalFrame.h" +#include "core/frame/LocalFrameClient.h" #include "core/frame/Settings.h" #include "core/html/HTMLCanvasElement.h" #include "core/html/HTMLImageElement.h" @@ -47,7 +48,6 @@ #include "core/inspector/InspectorInstrumentation.h" #include "core/layout/LayoutBox.h" #include "core/loader/FrameLoader.h" -#include "core/loader/FrameLoaderClient.h" #include "core/origin_trials/OriginTrials.h" #include "gpu/command_buffer/client/gles2_interface.h" #include "modules/webgl/ANGLEInstancedArrays.h" @@ -699,7 +699,7 @@ } Settings* settings = frame->settings(); - // The FrameLoaderClient might block creation of a new WebGL context despite + // The LocalFrameClient might block creation of a new WebGL context despite // the page settings; in particular, if WebGL contexts were lost one or more // times via the GL_ARB_robustness extension. if (!frame->loader().client()->allowWebGL(settings &&
diff --git a/third_party/WebKit/Source/modules/websockets/DOMWebSocketTest.cpp b/third_party/WebKit/Source/modules/websockets/DOMWebSocketTest.cpp index b27e4c6..b34c2ac 100644 --- a/third_party/WebKit/Source/modules/websockets/DOMWebSocketTest.cpp +++ b/third_party/WebKit/Source/modules/websockets/DOMWebSocketTest.cpp
@@ -4,6 +4,8 @@ #include "modules/websockets/DOMWebSocket.h" +#include <memory> + #include "bindings/core/v8/ExceptionState.h" #include "bindings/core/v8/V8Binding.h" #include "bindings/core/v8/V8BindingForTesting.h" @@ -18,12 +20,11 @@ #include "public/platform/WebInsecureRequestPolicy.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +#include "v8/include/v8.h" #include "wtf/Vector.h" #include "wtf/text/CString.h" #include "wtf/text/StringBuilder.h" #include "wtf/text/WTFString.h" -#include <memory> -#include <v8.h> using testing::_; using testing::AnyNumber;
diff --git a/third_party/WebKit/Source/platform/heap/Heap.cpp b/third_party/WebKit/Source/platform/heap/Heap.cpp index e0b5cb8..57dd6af 100644 --- a/third_party/WebKit/Source/platform/heap/Heap.cpp +++ b/third_party/WebKit/Source/platform/heap/Heap.cpp
@@ -152,7 +152,7 @@ m_freePagePool(WTF::wrapUnique(new PagePool)), m_markingStack(CallbackStack::create()), m_postMarkingCallbackStack(CallbackStack::create()), - m_globalWeakCallbackStack(CallbackStack::create()), + m_weakCallbackStack(CallbackStack::create()), m_ephemeronStack(CallbackStack::create()) { if (ThreadState::current()->isMainThread()) s_mainThreadHeap = this; @@ -248,12 +248,12 @@ void ThreadHeap::pushWeakCallback(void* closure, WeakCallback callback) { ASSERT(ThreadState::current()->isInGC()); - CallbackStack::Item* slot = m_globalWeakCallbackStack->allocateEntry(); + CallbackStack::Item* slot = m_weakCallbackStack->allocateEntry(); *slot = CallbackStack::Item(closure, callback); } -bool ThreadHeap::popAndInvokeGlobalWeakCallback(Visitor* visitor) { - if (CallbackStack::Item* item = m_globalWeakCallbackStack->pop()) { +bool ThreadHeap::popAndInvokeWeakCallback(Visitor* visitor) { + if (CallbackStack::Item* item = m_weakCallbackStack->pop()) { item->call(visitor); return true; } @@ -283,7 +283,7 @@ void ThreadHeap::commitCallbackStacks() { m_markingStack->commit(); m_postMarkingCallbackStack->commit(); - m_globalWeakCallbackStack->commit(); + m_weakCallbackStack->commit(); m_ephemeronStack->commit(); } @@ -309,7 +309,7 @@ void ThreadHeap::decommitCallbackStacks() { m_markingStack->decommit(); m_postMarkingCallbackStack->decommit(); - m_globalWeakCallbackStack->decommit(); + m_weakCallbackStack->decommit(); m_ephemeronStack->decommit(); } @@ -365,24 +365,24 @@ ASSERT(m_markingStack->isEmpty()); } -void ThreadHeap::globalWeakProcessing(Visitor* visitor) { - TRACE_EVENT0("blink_gc", "ThreadHeap::globalWeakProcessing"); +void ThreadHeap::weakProcessing(Visitor* visitor) { + TRACE_EVENT0("blink_gc", "ThreadHeap::weakProcessing"); double startTime = WTF::currentTimeMS(); // Call weak callbacks on objects that may now be pointing to dead objects. - while (popAndInvokeGlobalWeakCallback(visitor)) { + while (popAndInvokeWeakCallback(visitor)) { } // It is not permitted to trace pointers of live objects in the weak // callback phase, so the marking stack should still be empty here. ASSERT(m_markingStack->isEmpty()); - double timeForGlobalWeakProcessing = WTF::currentTimeMS() - startTime; + double timeForWeakProcessing = WTF::currentTimeMS() - startTime; DEFINE_THREAD_SAFE_STATIC_LOCAL( - CustomCountHistogram, globalWeakTimeHistogram, + CustomCountHistogram, weakProcessingTimeHistogram, new CustomCountHistogram("BlinkGC.TimeForGlobalWeakProcessing", 1, 10 * 1000, 50)); - globalWeakTimeHistogram.count(timeForGlobalWeakProcessing); + weakProcessingTimeHistogram.count(timeForWeakProcessing); } void ThreadHeap::reportMemoryUsageHistogram() {
diff --git a/third_party/WebKit/Source/platform/heap/Heap.h b/third_party/WebKit/Source/platform/heap/Heap.h index bf5ebe7..1e3a26c 100644 --- a/third_party/WebKit/Source/platform/heap/Heap.h +++ b/third_party/WebKit/Source/platform/heap/Heap.h
@@ -273,9 +273,7 @@ CallbackStack* postMarkingCallbackStack() const { return m_postMarkingCallbackStack.get(); } - CallbackStack* globalWeakCallbackStack() const { - return m_globalWeakCallbackStack.get(); - } + CallbackStack* weakCallbackStack() const { return m_weakCallbackStack.get(); } CallbackStack* ephemeronStack() const { return m_ephemeronStack.get(); } void visitPersistentRoots(Visitor*); @@ -340,7 +338,7 @@ // Remove an item from the weak callback work list and call the callback // with the visitor and the closure pointer. Returns false when there is // nothing more to do. - bool popAndInvokeGlobalWeakCallback(Visitor*); + bool popAndInvokeWeakCallback(Visitor*); // Register an ephemeron table for fixed-point iteration. void registerWeakTable(void* containerObject, @@ -395,7 +393,7 @@ void processMarkingStack(Visitor*); void postMarkingProcessing(Visitor*); - void globalWeakProcessing(Visitor*); + void weakProcessing(Visitor*); void preGC(); void postGC(BlinkGC::GCType); @@ -452,7 +450,7 @@ std::unique_ptr<PagePool> m_freePagePool; std::unique_ptr<CallbackStack> m_markingStack; std::unique_ptr<CallbackStack> m_postMarkingCallbackStack; - std::unique_ptr<CallbackStack> m_globalWeakCallbackStack; + std::unique_ptr<CallbackStack> m_weakCallbackStack; std::unique_ptr<CallbackStack> m_ephemeronStack; BlinkGC::GCReason m_lastGCReason; StackFrameDepth m_stackFrameDepth;
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp index 09617fb..add4a97 100644 --- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp +++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
@@ -1501,7 +1501,7 @@ heap().processMarkingStack(visitor.get()); heap().postMarkingProcessing(visitor.get()); - heap().globalWeakProcessing(visitor.get()); + heap().weakProcessing(visitor.get()); } double markingTimeInMilliseconds = WTF::currentTimeMS() - startTime;
diff --git a/third_party/WebKit/Source/web/SuspendableScriptExecutor.h b/third_party/WebKit/Source/web/SuspendableScriptExecutor.h index 54b8ceb..34f5477 100644 --- a/third_party/WebKit/Source/web/SuspendableScriptExecutor.h +++ b/third_party/WebKit/Source/web/SuspendableScriptExecutor.h
@@ -8,8 +8,8 @@ #include "core/frame/SuspendableTimer.h" #include "platform/heap/Handle.h" #include "platform/heap/SelfKeepAlive.h" +#include "v8/include/v8.h" #include "wtf/Vector.h" -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/web/WebCryptoNormalize.cpp b/third_party/WebKit/Source/web/WebCryptoNormalize.cpp index 16eabee0..4f020f6 100644 --- a/third_party/WebKit/Source/web/WebCryptoNormalize.cpp +++ b/third_party/WebKit/Source/web/WebCryptoNormalize.cpp
@@ -36,7 +36,7 @@ #include "modules/crypto/NormalizeAlgorithm.h" #include "platform/CryptoResult.h" #include "public/platform/WebString.h" -#include <v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/web/WebDOMFileSystem.cpp b/third_party/WebKit/Source/web/WebDOMFileSystem.cpp index 5e500e1..7b9a23fde 100644 --- a/third_party/WebKit/Source/web/WebDOMFileSystem.cpp +++ b/third_party/WebKit/Source/web/WebDOMFileSystem.cpp
@@ -38,8 +38,8 @@ #include "modules/filesystem/DOMFileSystem.h" #include "modules/filesystem/DirectoryEntry.h" #include "modules/filesystem/FileEntry.h" +#include "v8/include/v8.h" #include "web/WebLocalFrameImpl.h" -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/web/WebDocument.cpp b/third_party/WebKit/Source/web/WebDocument.cpp index c233eef2..ecd8bf0 100644 --- a/third_party/WebKit/Source/web/WebDocument.cpp +++ b/third_party/WebKit/Source/web/WebDocument.cpp
@@ -63,9 +63,9 @@ #include "public/web/WebElement.h" #include "public/web/WebElementCollection.h" #include "public/web/WebFormElement.h" +#include "v8/include/v8.h" #include "web/WebLocalFrameImpl.h" #include "wtf/PassRefPtr.h" -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/web/WebKit.cpp b/third_party/WebKit/Source/web/WebKit.cpp index ccc79f2..0bcd0fb7 100644 --- a/third_party/WebKit/Source/web/WebKit.cpp +++ b/third_party/WebKit/Source/web/WebKit.cpp
@@ -30,6 +30,8 @@ #include "public/web/WebKit.h" +#include <memory> + #include "bindings/core/v8/Microtask.h" #include "bindings/core/v8/V8Binding.h" #include "bindings/core/v8/V8GCController.h" @@ -44,14 +46,13 @@ #include "platform/heap/Heap.h" #include "public/platform/Platform.h" #include "public/platform/WebThread.h" +#include "v8/include/v8.h" #include "wtf/Assertions.h" #include "wtf/PtrUtil.h" #include "wtf/WTF.h" #include "wtf/allocator/Partitions.h" #include "wtf/text/AtomicString.h" #include "wtf/text/TextEncoding.h" -#include <memory> -#include <v8.h> namespace blink {
diff --git a/third_party/WebKit/Source/web/WebTestingSupport.cpp b/third_party/WebKit/Source/web/WebTestingSupport.cpp index 68a9dcd6..318adf6 100644 --- a/third_party/WebKit/Source/web/WebTestingSupport.cpp +++ b/third_party/WebKit/Source/web/WebTestingSupport.cpp
@@ -29,7 +29,7 @@ #include "bindings/modules/v8/V8WorkerInternalsPartial.h" #include "core/testing/v8/WebCoreTestSupport.h" #include "public/web/WebLocalFrame.h" -#include <v8/include/v8.h> +#include "v8/include/v8.h" namespace blink {
diff --git a/third_party/WebKit/Source/web/tests/ActivityLoggerTest.cpp b/third_party/WebKit/Source/web/tests/ActivityLoggerTest.cpp index 32939ff6..ad90d74 100644 --- a/third_party/WebKit/Source/web/tests/ActivityLoggerTest.cpp +++ b/third_party/WebKit/Source/web/tests/ActivityLoggerTest.cpp
@@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include <v8.h> #include "bindings/core/v8/ScriptController.h" #include "bindings/core/v8/ScriptSourceCode.h" #include "bindings/core/v8/V8Binding.h" #include "bindings/core/v8/V8DOMActivityLogger.h" #include "public/platform/WebCache.h" #include "testing/gtest/include/gtest/gtest.h" +#include "v8/include/v8.h" #include "web/WebLocalFrameImpl.h" #include "web/tests/FrameTestHelpers.h" #include "wtf/Forward.h"
diff --git a/third_party/WebKit/Source/web/tests/ListenerLeakTest.cpp b/third_party/WebKit/Source/web/tests/ListenerLeakTest.cpp index f6a9033..d9cb4ba3 100644 --- a/third_party/WebKit/Source/web/tests/ListenerLeakTest.cpp +++ b/third_party/WebKit/Source/web/tests/ListenerLeakTest.cpp
@@ -28,14 +28,14 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <v8-profiler.h> -#include <v8.h> #include "platform/testing/URLTestHelpers.h" #include "platform/testing/UnitTestHelpers.h" #include "public/platform/Platform.h" #include "public/platform/WebURLLoaderMockFactory.h" #include "public/web/WebView.h" #include "testing/gtest/include/gtest/gtest.h" +#include "v8/include/v8-profiler.h" +#include "v8/include/v8.h" #include "web/tests/FrameTestHelpers.h" namespace blink {
diff --git a/third_party/WebKit/Source/web/tests/RunAllTests.cpp b/third_party/WebKit/Source/web/tests/RunAllTests.cpp index f95a435..ee6fb61c 100644 --- a/third_party/WebKit/Source/web/tests/RunAllTests.cpp +++ b/third_party/WebKit/Source/web/tests/RunAllTests.cpp
@@ -37,7 +37,7 @@ #include "content/test/blink_test_environment.h" #include "platform/heap/ThreadState.h" #include "platform/weborigin/SchemeRegistry.h" -#include <v8.h> +#include "v8/include/v8.h" namespace {
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp index 43d8de1d..cd69fcb 100644 --- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp +++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -31,9 +31,10 @@ #include "public/web/WebFrame.h" #include <stdarg.h> -#include <v8.h> + #include <map> #include <memory> + #include "SkBitmap.h" #include "SkCanvas.h" #include "bindings/core/v8/SerializedScriptValueFactory.h" @@ -140,6 +141,7 @@ #include "public/web/WebViewClient.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +#include "v8/include/v8.h" #include "web/TextFinder.h" #include "web/WebLocalFrameImpl.h" #include "web/WebRemoteFrameImpl.h"
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 102d9ce..a54cd2d0 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -55789,6 +55789,16 @@ </summary> </histogram> +<histogram name="ResourcePrefetchPredictor.RedirectStatus" + enum="ResourcePrefetchPredictorRedirectStatus"> + <owner>alexilin@chromium.org</owner> + <summary> + When the prefetch predictor has resources in the local database for a given + navigation, records stats about whether redirect was predicted correctly or + incorrectly. + </summary> +</histogram> + <histogram name="ResourcePrefetchPredictor.ReportingEvent" enum="ResourcePrefetchPredictorReportingEvent"> <owner>alexilin@chromium.org</owner> @@ -102921,6 +102931,7 @@ <int value="9" label="Auto-signin toast timeout"/> <int value="10" label="Auto-signin toast clicked (obsolete)"/> <int value="11" label="Clicked 'Google Smart Lock'"/> + <int value="12" label="Clicked the link passwords.google.com"/> </enum> <enum name="PasswordReusePasswordFieldDetected" type="int"> @@ -105745,6 +105756,14 @@ <int value="7" label="CONNECTION_BLUETOOTH"/> </enum> +<enum name="ResourcePrefetchPredictorRedirectStatus" type="int"> + <int value="0" label="NO_REDIRECT"/> + <int value="1" label="NO_REDIRECT_BUT_PREDICTED"/> + <int value="2" label="REDIRECT_NOT_PREDICTED"/> + <int value="3" label="REDIRECT_WRONG_PREDICTED"/> + <int value="4" label="REDIRECT_CORRECTLY_PREDICTED"/> +</enum> + <enum name="ResourcePrefetchPredictorReportingEvent" type="int"> <int value="0" label="REPORTING_EVENT_ALL_HISTORY_CLEARED"/> <int value="1" label="REPORTING_EVENT_PARTIAL_HISTORY_CLEARED"/>
diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt index 0e1d0db0..6fc159861 100644 --- a/tools/valgrind/memcheck/suppressions.txt +++ b/tools/valgrind/memcheck/suppressions.txt
@@ -1046,19 +1046,19 @@ { bug_84770_a Memcheck:Unaddressable - fun:_ZN5blink21FrameLoaderClientImpl12allowPluginsEb + fun:_ZN5blink21LocalFrameClientImpl12allowPluginsEb fun:_ZN5blink14SubframeLoader12allowPluginsENS_28ReasonForCallingAllowPluginsE } { bug_84770_b Memcheck:Unaddressable - fun:_ZN5blink21FrameLoaderClientImpl15allowJavaScriptEb + fun:_ZN5blink21LocalFrameClientImpl15allowJavaScriptEb fun:_ZN5blink16ScriptController17canExecuteScriptsENS_33ReasonForCallingCanExecuteScriptsE } { bug_84770_c Memcheck:Unaddressable - fun:_ZN5blink21FrameLoaderClientImpl20allowScriptExtensionERKN3WTF6StringEi + fun:_ZN5blink21LocalFrameClientImpl20allowScriptExtensionERKN3WTF6StringEi fun:_ZN5blink16V8DOMWindowShell16createNewContextEN2v86HandleINS1_6ObjectEEEi } { @@ -2262,7 +2262,7 @@ fun:_ZN7content14RenderViewImpl20didClearWindowObjectEPN5blink13WebLocalFrameE fun:_ZN7content15RenderFrameImpl20didClearWindowObjectEPN5blink13WebLocalFrameE fun:_ZThn16_N7content15RenderFrameImpl20didClearWindowObjectEPN5blink13WebLocalFrameE - fun:_ZN5blink21FrameLoaderClientImpl39dispatchDidClearWindowObjectInMainWorldEv + fun:_ZN5blink21LocalFrameClientImpl39dispatchDidClearWindowObjectInMainWorldEv fun:_ZN5blink11FrameLoader39dispatchDidClearWindowObjectInMainWorldEv fun:_ZN5blink16ScriptController11windowShellERNS_15DOMWrapperWorldE fun:_ZN5blink11toV8ContextEPNS_10LocalFrameERNS_15DOMWrapperWorldE