diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index ef28915..18d86d2 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -683,7 +683,6 @@ #if BUILDFLAG(ENABLE_WEBRTC) webrtc_eventlog_host_(id_), #endif - max_worker_count_(0), permission_service_context_(new PermissionServiceContext(this)), channel_connected_(false), sent_render_process_ready_(false), @@ -1388,8 +1387,6 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(!is_worker_ref_count_disabled_); ++service_worker_ref_count_; - if (GetWorkerRefCount() > max_worker_count_) - max_worker_count_ = GetWorkerRefCount(); } void RenderProcessHostImpl::DecrementServiceWorkerRefCount() { @@ -1405,8 +1402,6 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(!is_worker_ref_count_disabled_); ++shared_worker_ref_count_; - if (GetWorkerRefCount() > max_worker_count_) - max_worker_count_ = GetWorkerRefCount(); } void RenderProcessHostImpl::DecrementSharedWorkerRefCount() { @@ -2144,13 +2139,6 @@ base::TimeTicks::Now() - survive_for_worker_start_time_); } - if (max_worker_count_ > 0) { - // Record the max number of workers (SharedWorker or ServiceWorker) - // that are simultaneously hosted in this renderer process. - UMA_HISTOGRAM_COUNTS("Render.Workers.MaxWorkerCountInRendererProcess", - max_worker_count_); - } - // We cannot clean up twice; if this fails, there is an issue with our // control flow. DCHECK(!deleting_soon_);
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h index dfe8d248..46e67e1 100644 --- a/content/browser/renderer_host/render_process_host_impl.h +++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -423,7 +423,11 @@ scoped_refptr<ConnectionFilterController> connection_filter_controller_; service_manager::mojom::ServicePtr test_service_; + // The number of service workers running in this process. size_t service_worker_ref_count_; + // See comments for IncrementSharedWorkerRefCount() and + // DecrementSharedWorkerRefCount(). This is more like a boolean flag and not + // actually the number of shared workers running in this process. size_t shared_worker_ref_count_; // Set in ForceReleaseWorkerRefCounts. When true, worker ref counts must no @@ -553,10 +557,6 @@ // Records the time when the process starts surviving for workers for UMA. base::TimeTicks survive_for_worker_start_time_; - // Records the maximum # of workers simultaneously hosted in this process - // for UMA. - size_t max_worker_count_; - // Context shared for each mojom::PermissionService instance created for this // RPH. std::unique_ptr<PermissionServiceContext> permission_service_context_;
diff --git a/content/public/browser/render_process_host.h b/content/public/browser/render_process_host.h index 3bdae8d..0477aa0 100644 --- a/content/public/browser/render_process_host.h +++ b/content/public/browser/render_process_host.h
@@ -313,19 +313,17 @@ virtual void IncrementServiceWorkerRefCount() = 0; virtual void DecrementServiceWorkerRefCount() = 0; - // Called when the existence of the other renderer process which is connected - // to the Worker in this renderer process has changed. - - // The shared worker ref count is nonzero if any other process is connected to - // a shared worker in this process, or a new shared worker is being created in - // this process. IncrementSharedWorkerRefCount is called in two cases: + // The shared worker ref count is non-zero if any other process is connected + // to a shared worker in this process, or a new shared worker is being created + // in this process. + // IncrementSharedWorkerRefCount is called in two cases: // - there was no external renderer connected to a shared worker in this // process, and now there is at least one // - a new worker is being created in this process. // DecrementSharedWorkerRefCount is called in two cases: // - there was an external renderer connected to a shared worker in this // process, and now there is none - // - a new worker finished being created in this process + // - a new worker finished being created in this process. virtual void IncrementSharedWorkerRefCount() = 0; virtual void DecrementSharedWorkerRefCount() = 0;
diff --git a/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm b/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm index 969d3542..62129219 100644 --- a/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm +++ b/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm
@@ -124,7 +124,12 @@ [[EarlGrey selectElementWithMatcher:new_incognito_tab_button_matcher] performAction:grey_tap()]; chrome_test_util::AssertIncognitoTabCount(nb_incognito_tab + 1); - + ConditionBlock condition = ^bool { + return chrome_test_util::IsIncognitoMode(); + }; + GREYAssert( + testing::WaitUntilConditionOrTimeout(kWaitElementTimeout, condition), + @"Waiting switch to incognito mode."); chrome_test_util::EvictOtherTabModelTabs(); } @@ -183,13 +188,17 @@ [[EarlGrey selectElementWithMatcher: chrome_test_util::buttonWithAccessibilityLabelId( IDS_IOS_TOOLS_MENU_NEW_INCOGNITO_TAB)] - performAction:grey_swipeFastInDirection(kGREYDirectionRight)]; + performAction:grey_swipeSlowInDirection(kGREYDirectionRight)]; [[EarlGrey selectElementWithMatcher: chrome_test_util::buttonWithAccessibilityLabelId( IDS_IOS_TOOLBAR_SHOW_TABS)] performAction:grey_tap()]; } - GREYAssertFalse(chrome_test_util::IsIncognitoMode(), - @"Switching to normal mode failed."); + ConditionBlock condition = ^bool { + return !chrome_test_util::IsIncognitoMode(); + }; + GREYAssert( + testing::WaitUntilConditionOrTimeout(kWaitElementTimeout, condition), + @"Waiting switch to normal mode."); } // Check that the error page is visible.
diff --git a/third_party/WebKit/Source/core/html/ImageDocument.cpp b/third_party/WebKit/Source/core/html/ImageDocument.cpp index 15d9f103..6bf1f3d 100644 --- a/third_party/WebKit/Source/core/html/ImageDocument.cpp +++ b/third_party/WebKit/Source/core/html/ImageDocument.cpp
@@ -403,7 +403,7 @@ scale = viewportWidth / static_cast<double>(calculateDivWidth()); } - newCheckerSize = round(std::max(1.0, newCheckerSize / scale)); + newCheckerSize = std::round(std::max(1.0, newCheckerSize / scale)); } else { // In desktop mode, the user can click on the image to zoom in or out. DCHECK_EQ(m_shrinkToFitMode, Desktop);
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index d9e67d0..06a962e5 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -51667,6 +51667,13 @@ </histogram> <histogram name="Render.Workers.MaxWorkerCountInRendererProcess"> + <obsolete> + Deprecated Dec 2016. This metric did not report the number of shared workers + correctly, since it used the RenderProcessHostImpl ref counts, which in the + shared worker case is more like a boolean flag (zero or one or maybe two) + than the number of shared workers. So its results can be thought of as + roughly the number of service workers only. + </obsolete> <owner>kinuko@chromium.org</owner> <summary> Maximum number of workers (SharedWorker or ServiceWorker) that are