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

Unified Diff: third_party/WebKit/Source/modules/budget/NavigatorBudget.cpp

Issue 2646383002: Use a new Supplement constructor for (Worker)Navigator supplements (Closed)
Patch Set: temp Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/budget/NavigatorBudget.cpp
diff --git a/third_party/WebKit/Source/modules/budget/NavigatorBudget.cpp b/third_party/WebKit/Source/modules/budget/NavigatorBudget.cpp
index 664d4ea5ec1f2499ab3e43670c6579778dfde4d6..7c5b9bc64734f03e4dd394229fb2c4aca01d55b1 100644
--- a/third_party/WebKit/Source/modules/budget/NavigatorBudget.cpp
+++ b/third_party/WebKit/Source/modules/budget/NavigatorBudget.cpp
@@ -9,7 +9,8 @@
namespace blink {
-NavigatorBudget::NavigatorBudget() {}
+NavigatorBudget::NavigatorBudget(Navigator& navigator)
+ : Supplement<Navigator>(navigator) {}
// static
const char* NavigatorBudget::supplementName() {
@@ -23,7 +24,7 @@ NavigatorBudget& NavigatorBudget::from(Navigator& navigator) {
Supplement<Navigator>::from(navigator, supplementName()));
if (!navigatorBudget) {
// If there isn't one already, create it now and associate it.
- navigatorBudget = new NavigatorBudget();
+ navigatorBudget = new NavigatorBudget(navigator);
Supplement<Navigator>::provideTo(navigator, supplementName(),
navigatorBudget);
}

Powered by Google App Engine
This is Rietveld 408576698