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

Side by Side Diff: chrome/browser/profiles/profile_browsertest.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/profiles/profile.h" 5 #include "chrome/browser/profiles/profile.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 const base::FilePath& path, 171 const base::FilePath& path,
172 Profile::Delegate* delegate, 172 Profile::Delegate* delegate,
173 Profile::CreateMode create_mode) { 173 Profile::CreateMode create_mode) {
174 scoped_ptr<Profile> profile(Profile::CreateProfile( 174 scoped_ptr<Profile> profile(Profile::CreateProfile(
175 path, delegate, create_mode)); 175 path, delegate, create_mode));
176 EXPECT_TRUE(profile.get()); 176 EXPECT_TRUE(profile.get());
177 177
178 // Store the Profile's IO task runner so we can wind it down. 178 // Store the Profile's IO task runner so we can wind it down.
179 profile_io_task_runner_ = profile->GetIOTaskRunner(); 179 profile_io_task_runner_ = profile->GetIOTaskRunner();
180 180
181 return profile.Pass(); 181 return profile;
182 } 182 }
183 183
184 void FlushIoTaskRunnerAndSpinThreads() { 184 void FlushIoTaskRunnerAndSpinThreads() {
185 FlushTaskRunner(profile_io_task_runner_.get()); 185 FlushTaskRunner(profile_io_task_runner_.get());
186 SpinThreads(); 186 SpinThreads();
187 } 187 }
188 188
189 // Starts a test where a URLFetcher is active during profile shutdown. The 189 // Starts a test where a URLFetcher is active during profile shutdown. The
190 // test completes during teardown of the test fixture. The request should be 190 // test completes during teardown of the test fixture. The request should be
191 // canceled by |context_getter| during profile shutdown, before the 191 // canceled by |context_getter| during profile shutdown, before the
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 546
547 IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, 547 IN_PROC_BROWSER_TEST_F(ProfileBrowserTest,
548 URLFetcherUsingExtensionContextDuringIncognitoTeardown) { 548 URLFetcherUsingExtensionContextDuringIncognitoTeardown) {
549 Browser* incognito_browser = 549 Browser* incognito_browser =
550 OpenURLOffTheRecord(browser()->profile(), GURL("about:blank")); 550 OpenURLOffTheRecord(browser()->profile(), GURL("about:blank"));
551 551
552 RunURLFetcherActiveDuringIncognitoTeardownTest( 552 RunURLFetcherActiveDuringIncognitoTeardownTest(
553 incognito_browser, 553 incognito_browser,
554 incognito_browser->profile()->GetRequestContextForExtensions()); 554 incognito_browser->profile()->GetRequestContextForExtensions());
555 } 555 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698