| OLD | NEW |
| 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 <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 created_by_version = "1.0.0.0"; | 123 created_by_version = "1.0.0.0"; |
| 124 } | 124 } |
| 125 std::string pref_version = | 125 std::string pref_version = |
| 126 ChromeVersionService::GetVersion(profile->GetPrefs()); | 126 ChromeVersionService::GetVersion(profile->GetPrefs()); |
| 127 // Assert that created_by_version pref gets set to current version. | 127 // Assert that created_by_version pref gets set to current version. |
| 128 EXPECT_EQ(created_by_version, pref_version); | 128 EXPECT_EQ(created_by_version, pref_version); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void FlushTaskRunner(base::SequencedTaskRunner* runner) { | 131 void FlushTaskRunner(base::SequencedTaskRunner* runner) { |
| 132 ASSERT_TRUE(runner); | 132 ASSERT_TRUE(runner); |
| 133 base::WaitableEvent unblock(false, false); | 133 base::WaitableEvent unblock(base::WaitableEvent::ResetPolicy::AUTOMATIC, |
| 134 base::WaitableEvent::InitialState::NOT_SIGNALED); |
| 134 | 135 |
| 135 runner->PostTask(FROM_HERE, | 136 runner->PostTask(FROM_HERE, |
| 136 base::Bind(&base::WaitableEvent::Signal, base::Unretained(&unblock))); | 137 base::Bind(&base::WaitableEvent::Signal, base::Unretained(&unblock))); |
| 137 | 138 |
| 138 unblock.Wait(); | 139 unblock.Wait(); |
| 139 } | 140 } |
| 140 | 141 |
| 141 void SpinThreads() { | 142 void SpinThreads() { |
| 142 // Give threads a chance to do their stuff before shutting down (i.e. | 143 // Give threads a chance to do their stuff before shutting down (i.e. |
| 143 // deleting scoped temp dir etc). | 144 // deleting scoped temp dir etc). |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 | 680 |
| 680 IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, | 681 IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, |
| 681 URLFetcherUsingExtensionContextDuringIncognitoTeardown) { | 682 URLFetcherUsingExtensionContextDuringIncognitoTeardown) { |
| 682 Browser* incognito_browser = | 683 Browser* incognito_browser = |
| 683 OpenURLOffTheRecord(browser()->profile(), GURL("about:blank")); | 684 OpenURLOffTheRecord(browser()->profile(), GURL("about:blank")); |
| 684 | 685 |
| 685 RunURLFetcherActiveDuringIncognitoTeardownTest( | 686 RunURLFetcherActiveDuringIncognitoTeardownTest( |
| 686 incognito_browser, | 687 incognito_browser, |
| 687 incognito_browser->profile()->GetRequestContextForExtensions()); | 688 incognito_browser->profile()->GetRequestContextForExtensions()); |
| 688 } | 689 } |
| OLD | NEW |