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

Side by Side Diff: extensions/browser/mojo/stash_backend_unittest.cc

Issue 1909773002: Convert //extensions/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 "extensions/browser/mojo/stash_backend.h" 5 #include "extensions/browser/mojo/stash_backend.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 void OnHandleReadyToRead() { 90 void OnHandleReadyToRead() {
91 handles_ready_++; 91 handles_ready_++;
92 EventReceived(EVENT_HANDLE_READY); 92 EventReceived(EVENT_HANDLE_READY);
93 } 93 }
94 94
95 protected: 95 protected:
96 base::MessageLoop message_loop_; 96 base::MessageLoop message_loop_;
97 base::Closure stop_run_loop_; 97 base::Closure stop_run_loop_;
98 scoped_ptr<StashBackend> stash_backend_; 98 std::unique_ptr<StashBackend> stash_backend_;
99 Event expected_event_; 99 Event expected_event_;
100 bool expecting_error_; 100 bool expecting_error_;
101 mojo::InterfacePtr<StashService> stash_service_; 101 mojo::InterfacePtr<StashService> stash_service_;
102 int handles_ready_; 102 int handles_ready_;
103 103
104 private: 104 private:
105 DISALLOW_COPY_AND_ASSIGN(StashServiceTest); 105 DISALLOW_COPY_AND_ASSIGN(StashServiceTest);
106 }; 106 };
107 107
108 // Test that adding stashed objects in multiple calls can all be retrieved by a 108 // Test that adding stashed objects in multiple calls can all be retrieved by a
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 ASSERT_EQ(0u, stashed_objects.size()); 292 ASSERT_EQ(0u, stashed_objects.size());
293 // Check that the stashed handle has been closed. 293 // Check that the stashed handle has been closed.
294 MojoResult result = 294 MojoResult result =
295 mojo::Wait(message_pipe.handle1.get(), 295 mojo::Wait(message_pipe.handle1.get(),
296 MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_READABLE, 296 MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_READABLE,
297 MOJO_DEADLINE_INDEFINITE, nullptr); 297 MOJO_DEADLINE_INDEFINITE, nullptr);
298 EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION, result); 298 EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION, result);
299 } 299 }
300 300
301 } // namespace extensions 301 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/mojo/stash_backend.cc ('k') | extensions/browser/process_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698