Index: chrome/browser/ui/views/frame/browser_view_unittest.cc |
diff --git a/chrome/browser/ui/views/frame/browser_view_unittest.cc b/chrome/browser/ui/views/frame/browser_view_unittest.cc |
index d3ad284c86876024b5c4cbfee8b65bd37730c528..38e6ae22dbe3642c0df8cec8ad72703a6e69a55c 100644 |
--- a/chrome/browser/ui/views/frame/browser_view_unittest.cc |
+++ b/chrome/browser/ui/views/frame/browser_view_unittest.cc |
@@ -324,9 +324,9 @@ class BrowserViewIncognitoSwitcherTest : public BrowserViewTest { |
// visible. |
// This profile instance is owned by the TestingProfile instance within the |
// BrowserWithTestWindowTest class. |
- TestingProfile* incognito_profile = new TestingProfile(); |
- incognito_profile->set_incognito(true); |
- GetProfile()->SetOffTheRecordProfile(incognito_profile); |
+ TestingProfile::Builder builder; |
+ builder.SetIncognito(); |
+ GetProfile()->SetOffTheRecordProfile(builder.Build()); |
browser_view_ = new TestBrowserView(); |
browser_view_->SetWindowSwitcherButton( |