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

Side by Side Diff: chromecast/app/linux/cast_crash_reporter_client_unittest.cc

Issue 1875623002: Convert //chromecast 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
« no previous file with comments | « chromecast/app/cast_main_delegate.h ('k') | chromecast/base/bind_to_task_runner.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <fstream> 5 #include <fstream>
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 EXPECT_EQ("pandora", dump_info.params().current_app_name); 111 EXPECT_EQ("pandora", dump_info.params().current_app_name);
112 EXPECT_EQ("netflix", dump_info.params().last_app_name); 112 EXPECT_EQ("netflix", dump_info.params().last_app_name);
113 } 113 }
114 114
115 base::FilePath minidump_path() { return minidump_.path(); } 115 base::FilePath minidump_path() { return minidump_.path(); }
116 base::FilePath home_path() { return fake_home_dir_.path(); } 116 base::FilePath home_path() { return fake_home_dir_.path(); }
117 117
118 private: 118 private:
119 base::ScopedTempDir fake_home_dir_; 119 base::ScopedTempDir fake_home_dir_;
120 ScopedTempFile minidump_; 120 ScopedTempFile minidump_;
121 scoped_ptr<base::ScopedPathOverride> home_override_; 121 std::unique_ptr<base::ScopedPathOverride> home_override_;
122 122
123 DISALLOW_COPY_AND_ASSIGN(CastCrashReporterClientTest); 123 DISALLOW_COPY_AND_ASSIGN(CastCrashReporterClientTest);
124 }; 124 };
125 125
126 #if ENABLE_THREAD_RESTRICTIONS 126 #if ENABLE_THREAD_RESTRICTIONS
127 // This test shall only be run when thread restricitons are enabled. Otherwise, 127 // This test shall only be run when thread restricitons are enabled. Otherwise,
128 // the thread will not actually be IO-restricted, and the final ASSERT will 128 // the thread will not actually be IO-restricted, and the final ASSERT will
129 // fail. 129 // fail.
130 TEST_F(CastCrashReporterClientTest, EndToEndTestOnIORestrictedThread) { 130 TEST_F(CastCrashReporterClientTest, EndToEndTestOnIORestrictedThread) {
131 // Handle a "crash" on an IO restricted thread. 131 // Handle a "crash" on an IO restricted thread.
(...skipping 12 matching lines...) Expand all
144 base::ThreadRestrictions::SetIOAllowed(true); 144 base::ThreadRestrictions::SetIOAllowed(true);
145 CastCrashReporterClient client; 145 CastCrashReporterClient client;
146 ASSERT_TRUE(client.HandleCrashDump(minidump_path().value().c_str())); 146 ASSERT_TRUE(client.HandleCrashDump(minidump_path().value().c_str()));
147 147
148 // Assert that the thread is not IO restricted when the function exits. 148 // Assert that the thread is not IO restricted when the function exits.
149 // Note that SetIOAllowed returns the previous value. 149 // Note that SetIOAllowed returns the previous value.
150 ASSERT_TRUE(base::ThreadRestrictions::SetIOAllowed(true)); 150 ASSERT_TRUE(base::ThreadRestrictions::SetIOAllowed(true));
151 } 151 }
152 152
153 } // namespace chromecast 153 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/app/cast_main_delegate.h ('k') | chromecast/base/bind_to_task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698