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

Side by Side Diff: chrome/browser/chrome_content_browser_client_unittest.cc

Issue 2358723002: Convert FieldTrialList to Accept a std::unique_ptr (Closed)
Patch Set: Change Comment nullptr to null Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 } 292 }
293 293
294 #if !defined(OS_ANDROID) 294 #if !defined(OS_ANDROID)
295 namespace content { 295 namespace content {
296 296
297 class InstantNTPURLRewriteTest : public BrowserWithTestWindowTest { 297 class InstantNTPURLRewriteTest : public BrowserWithTestWindowTest {
298 protected: 298 protected:
299 void SetUp() override { 299 void SetUp() override {
300 BrowserWithTestWindowTest::SetUp(); 300 BrowserWithTestWindowTest::SetUp();
301 field_trial_list_.reset(new base::FieldTrialList( 301 field_trial_list_.reset(new base::FieldTrialList(
302 new metrics::SHA1EntropyProvider("42"))); 302 base::MakeUnique<metrics::SHA1EntropyProvider>("42")));
303 } 303 }
304 304
305 void InstallTemplateURLWithNewTabPage(GURL new_tab_page_url) { 305 void InstallTemplateURLWithNewTabPage(GURL new_tab_page_url) {
306 TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse( 306 TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse(
307 profile(), &TemplateURLServiceFactory::BuildInstanceFor); 307 profile(), &TemplateURLServiceFactory::BuildInstanceFor);
308 TemplateURLService* template_url_service = 308 TemplateURLService* template_url_service =
309 TemplateURLServiceFactory::GetForProfile(browser()->profile()); 309 TemplateURLServiceFactory::GetForProfile(browser()->profile());
310 search_test_utils::WaitForTemplateURLServiceToLoad(template_url_service); 310 search_test_utils::WaitForTemplateURLServiceToLoad(template_url_service);
311 311
312 TemplateURLData data; 312 TemplateURLData data;
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 client.ClearSiteData( 707 client.ClearSiteData(
708 profile(), origin, true /* cookies */, false /* storage */, 708 profile(), origin, true /* cookies */, false /* storage */,
709 true /* cache */, 709 true /* cache */,
710 base::Bind( 710 base::Bind(
711 &ChromeContentBrowserClientClearSiteDataTest::SetClearingFinished, 711 &ChromeContentBrowserClientClearSiteDataTest::SetClearingFinished,
712 base::Unretained(this), true)); 712 base::Unretained(this), true));
713 EXPECT_TRUE(IsClearingFinished()); 713 EXPECT_TRUE(IsClearingFinished());
714 } 714 }
715 715
716 } // namespace 716 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698