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

Unified Diff: content/child/font_warmup_win_unittest.cc

Issue 2618443002: Remove use of legacy SkFontMgr factories. (Closed)
Patch Set: Another include. 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..47703ece7d831b86f4ebe50dd162b51535adc221 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,9 +131,11 @@ 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);
+ content::SetPreSandboxWarmupFontMgrForTesting(sk_sp<SkFontMgr>());
f(malita) 2017/01/09 15:25:34 nit: I think nullptr reads better here.
bungeman-chromium 2017/01/09 19:15:28 Done.
}
protected:

Powered by Google App Engine
This is Rietveld 408576698