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

Side by Side Diff: content/browser/appcache/appcache_response_unittest.cc

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stdint.h> 5 #include <stdint.h>
6 #include <string.h> 6 #include <string.h>
7 7
8 #include <stack> 8 #include <stack>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 } 750 }
751 751
752 void VerifyNoCallbacks() { 752 void VerifyNoCallbacks() {
753 EXPECT_TRUE(!write_callback_was_called_); 753 EXPECT_TRUE(!write_callback_was_called_);
754 EXPECT_TRUE(!read_callback_was_called_); 754 EXPECT_TRUE(!read_callback_was_called_);
755 TestFinished(); 755 TestFinished();
756 } 756 }
757 757
758 // Data members 758 // Data members
759 759
760 scoped_ptr<base::WaitableEvent> test_finished_event_; 760 std::unique_ptr<base::WaitableEvent> test_finished_event_;
761 scoped_ptr<MockStorageDelegate> storage_delegate_; 761 std::unique_ptr<MockStorageDelegate> storage_delegate_;
762 scoped_ptr<MockAppCacheService> service_; 762 std::unique_ptr<MockAppCacheService> service_;
763 std::stack<std::pair<base::Closure, bool> > task_stack_; 763 std::stack<std::pair<base::Closure, bool> > task_stack_;
764 764
765 scoped_ptr<AppCacheResponseReader> reader_; 765 std::unique_ptr<AppCacheResponseReader> reader_;
766 scoped_refptr<HttpResponseInfoIOBuffer> read_info_buffer_; 766 scoped_refptr<HttpResponseInfoIOBuffer> read_info_buffer_;
767 scoped_refptr<IOBuffer> read_buffer_; 767 scoped_refptr<IOBuffer> read_buffer_;
768 int expected_read_result_; 768 int expected_read_result_;
769 bool should_delete_reader_in_completion_callback_; 769 bool should_delete_reader_in_completion_callback_;
770 int reader_deletion_count_down_; 770 int reader_deletion_count_down_;
771 bool read_callback_was_called_; 771 bool read_callback_was_called_;
772 772
773 int64_t written_response_id_; 773 int64_t written_response_id_;
774 scoped_ptr<AppCacheResponseWriter> writer_; 774 std::unique_ptr<AppCacheResponseWriter> writer_;
775 scoped_ptr<AppCacheResponseMetadataWriter> metadata_writer_; 775 std::unique_ptr<AppCacheResponseMetadataWriter> metadata_writer_;
776 scoped_refptr<HttpResponseInfoIOBuffer> write_info_buffer_; 776 scoped_refptr<HttpResponseInfoIOBuffer> write_info_buffer_;
777 scoped_refptr<IOBuffer> write_buffer_; 777 scoped_refptr<IOBuffer> write_buffer_;
778 int expected_write_result_; 778 int expected_write_result_;
779 bool should_delete_writer_in_completion_callback_; 779 bool should_delete_writer_in_completion_callback_;
780 int writer_deletion_count_down_; 780 int writer_deletion_count_down_;
781 bool write_callback_was_called_; 781 bool write_callback_was_called_;
782 782
783 static scoped_ptr<base::Thread> io_thread_; 783 static std::unique_ptr<base::Thread> io_thread_;
784 }; 784 };
785 785
786 // static 786 // static
787 scoped_ptr<base::Thread> AppCacheResponseTest::io_thread_; 787 std::unique_ptr<base::Thread> AppCacheResponseTest::io_thread_;
788 788
789 TEST_F(AppCacheResponseTest, ReadNonExistentResponse) { 789 TEST_F(AppCacheResponseTest, ReadNonExistentResponse) {
790 RunTestOnIOThread(&AppCacheResponseTest::ReadNonExistentResponse); 790 RunTestOnIOThread(&AppCacheResponseTest::ReadNonExistentResponse);
791 } 791 }
792 792
793 TEST_F(AppCacheResponseTest, LoadResponseInfo_Miss) { 793 TEST_F(AppCacheResponseTest, LoadResponseInfo_Miss) {
794 RunTestOnIOThread(&AppCacheResponseTest::LoadResponseInfo_Miss); 794 RunTestOnIOThread(&AppCacheResponseTest::LoadResponseInfo_Miss);
795 } 795 }
796 796
797 TEST_F(AppCacheResponseTest, LoadResponseInfo_Hit) { 797 TEST_F(AppCacheResponseTest, LoadResponseInfo_Hit) {
(...skipping 18 matching lines...) Expand all
816 816
817 TEST_F(AppCacheResponseTest, DeleteWithinCallbacks) { 817 TEST_F(AppCacheResponseTest, DeleteWithinCallbacks) {
818 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithinCallbacks); 818 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithinCallbacks);
819 } 819 }
820 820
821 TEST_F(AppCacheResponseTest, DeleteWithIOPending) { 821 TEST_F(AppCacheResponseTest, DeleteWithIOPending) {
822 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithIOPending); 822 RunTestOnIOThread(&AppCacheResponseTest::DeleteWithIOPending);
823 } 823 }
824 824
825 } // namespace content 825 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_response.cc ('k') | content/browser/appcache/appcache_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698