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

Side by Side Diff: chrome/browser/history/android/android_history_provider_service_unittest.cc

Issue 2907253003: Replace deprecated base::NonThreadSafe in chrome/browser/profiles. (Closed)
Patch Set: Android crashes?? Revert improvement to chrome_network_delegate_unittest.cc... Created 3 years, 6 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/history/android/android_history_provider_service.h" 5 #include "chrome/browser/history/android/android_history_provider_service.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 service_.reset(new AndroidHistoryProviderService(testing_profile_)); 60 service_.reset(new AndroidHistoryProviderService(testing_profile_));
61 } 61 }
62 62
63 void TearDown() override { 63 void TearDown() override {
64 testing_profile_->DestroyHistoryService(); 64 testing_profile_->DestroyHistoryService();
65 profile_manager_.DeleteTestingProfile(chrome::kInitialProfile); 65 profile_manager_.DeleteTestingProfile(chrome::kInitialProfile);
66 testing_profile_ = nullptr; 66 testing_profile_ = nullptr;
67 } 67 }
68 68
69 protected: 69 protected:
70 content::TestBrowserThreadBundle test_browser_thread_bundle_;
70 TestingProfileManager profile_manager_; 71 TestingProfileManager profile_manager_;
71 content::TestBrowserThreadBundle test_browser_thread_bundle_;
72 std::unique_ptr<AndroidHistoryProviderService> service_; 72 std::unique_ptr<AndroidHistoryProviderService> service_;
73 base::CancelableTaskTracker cancelable_tracker_; 73 base::CancelableTaskTracker cancelable_tracker_;
74 TestingProfile* testing_profile_; 74 TestingProfile* testing_profile_;
75 75
76 private: 76 private:
77 DISALLOW_COPY_AND_ASSIGN(AndroidHistoryProviderServiceTest); 77 DISALLOW_COPY_AND_ASSIGN(AndroidHistoryProviderServiceTest);
78 }; 78 };
79 79
80 class CallbackHelper : public base::RefCountedThreadSafe<CallbackHelper> { 80 class CallbackHelper : public base::RefCountedThreadSafe<CallbackHelper> {
81 public: 81 public:
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 service_->DeleteSearchTerms(std::string(), 283 service_->DeleteSearchTerms(std::string(),
284 std::vector<base::string16>(), 284 std::vector<base::string16>(),
285 Bind(&CallbackHelper::OnDeleted, callback.get()), 285 Bind(&CallbackHelper::OnDeleted, callback.get()),
286 &cancelable_tracker_); 286 &cancelable_tracker_);
287 RunMessageLoop(callback.get()); 287 RunMessageLoop(callback.get());
288 EXPECT_TRUE(callback->success()); 288 EXPECT_TRUE(callback->success());
289 EXPECT_EQ(1, callback->count()); 289 EXPECT_EQ(1, callback->count());
290 } 290 }
291 291
292 } // namespace 292 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698