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

Side by Side Diff: content/browser/storage_partition_impl_unittest.cc

Issue 2082343002: Remove calls to deprecated MessageLoop methods in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR Created 4 years, 5 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 class AwaitCompletionHelper { 94 class AwaitCompletionHelper {
95 public: 95 public:
96 AwaitCompletionHelper() : start_(false), already_quit_(false) {} 96 AwaitCompletionHelper() : start_(false), already_quit_(false) {}
97 virtual ~AwaitCompletionHelper() {} 97 virtual ~AwaitCompletionHelper() {}
98 98
99 void BlockUntilNotified() { 99 void BlockUntilNotified() {
100 if (!already_quit_) { 100 if (!already_quit_) {
101 DCHECK(!start_); 101 DCHECK(!start_);
102 start_ = true; 102 start_ = true;
103 base::MessageLoop::current()->Run(); 103 base::RunLoop().Run();
104 } else { 104 } else {
105 DCHECK(!start_); 105 DCHECK(!start_);
106 already_quit_ = false; 106 already_quit_ = false;
107 } 107 }
108 } 108 }
109 109
110 void Notify() { 110 void Notify() {
111 if (start_) { 111 if (start_) {
112 DCHECK(!already_quit_); 112 DCHECK(!already_quit_);
113 base::MessageLoop::current()->QuitWhenIdle(); 113 base::MessageLoop::current()->QuitWhenIdle();
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 CanonicalCookie::Create(url2, "A=B;domain=.example.com", now, options)); 1313 CanonicalCookie::Create(url2, "A=B;domain=.example.com", now, options));
1314 invalid_cookies.push_back(CanonicalCookie::Create(url3, "A=B", now, options)); 1314 invalid_cookies.push_back(CanonicalCookie::Create(url3, "A=B", now, options));
1315 1315
1316 for (const auto& cookie : valid_cookies) 1316 for (const auto& cookie : valid_cookies)
1317 EXPECT_TRUE(predicate.Run(*cookie)) << cookie->DebugString(); 1317 EXPECT_TRUE(predicate.Run(*cookie)) << cookie->DebugString();
1318 for (const auto& cookie : invalid_cookies) 1318 for (const auto& cookie : invalid_cookies)
1319 EXPECT_FALSE(predicate.Run(*cookie)) << cookie->DebugString(); 1319 EXPECT_FALSE(predicate.Run(*cookie)) << cookie->DebugString();
1320 } 1320 }
1321 1321
1322 } // namespace content 1322 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_unittest.cc ('k') | content/browser/webui/url_data_manager_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698