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

Unified Diff: content/child/font_warmup_win_unittest.cc

Issue 2618443002: Remove use of legacy SkFontMgr factories. (Closed)
Patch Set: Address comments. 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: content/child/font_warmup_win_unittest.cc
diff --git a/content/child/font_warmup_win_unittest.cc b/content/child/font_warmup_win_unittest.cc
index 21ba20da10a1a662f26cadfcf406f458b800485b..9494655b2b3f867e55bd72033ea5f3435b6d2d1f 100644
--- a/content/child/font_warmup_win_unittest.cc
+++ b/content/child/font_warmup_win_unittest.cc
@@ -16,6 +16,7 @@
#include "base/sys_byteorder.h"
#include "base/win/windows_version.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/core/SkString.h"
#include "third_party/skia/include/core/SkTypeface.h"
#include "third_party/skia/include/ports/SkFontMgr.h"
@@ -130,7 +131,9 @@ const wchar_t* kTestFontFamilyInvalid = L"InvalidFont";
class TestSkFontMgr : public SkFontMgr {
public:
- TestSkFontMgr() { content::SetPreSandboxWarmupFontMgrForTesting(this); }
+ TestSkFontMgr() {
+ content::SetPreSandboxWarmupFontMgrForTesting(sk_ref_sp(this));
+ }
~TestSkFontMgr() override {
content::SetPreSandboxWarmupFontMgrForTesting(nullptr);
}

Powered by Google App Engine
This is Rietveld 408576698