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

Side by Side Diff: content/browser/webui/web_ui_mojo_browsertest.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 <limits> 5 #include <limits>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 : WebUIController(web_ui), run_loop_(run_loop) { 97 : WebUIController(web_ui), run_loop_(run_loop) {
98 content::WebUIDataSource* data_source = 98 content::WebUIDataSource* data_source =
99 WebUIDataSource::Create("mojo-web-ui"); 99 WebUIDataSource::Create("mojo-web-ui");
100 data_source->SetRequestFilter(base::Bind(&GetResource)); 100 data_source->SetRequestFilter(base::Bind(&GetResource));
101 content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(), 101 content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(),
102 data_source); 102 data_source);
103 } 103 }
104 104
105 protected: 105 protected:
106 base::RunLoop* run_loop_; 106 base::RunLoop* run_loop_;
107 scoped_ptr<BrowserTargetImpl> browser_target_; 107 std::unique_ptr<BrowserTargetImpl> browser_target_;
108 108
109 private: 109 private:
110 DISALLOW_COPY_AND_ASSIGN(TestWebUIController); 110 DISALLOW_COPY_AND_ASSIGN(TestWebUIController);
111 }; 111 };
112 112
113 // TestWebUIController that additionally creates the ping test BrowserTarget 113 // TestWebUIController that additionally creates the ping test BrowserTarget
114 // implementation at the right time. 114 // implementation at the right time.
115 class PingTestWebUIController : public TestWebUIController { 115 class PingTestWebUIController : public TestWebUIController {
116 public: 116 public:
117 PingTestWebUIController(WebUI* web_ui, base::RunLoop* run_loop) 117 PingTestWebUIController(WebUI* web_ui, base::RunLoop* run_loop)
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 GURL("chrome://mojo-web-ui/web_ui_mojo_shell_test.html")); 240 GURL("chrome://mojo-web-ui/web_ui_mojo_shell_test.html"));
241 241
242 DOMMessageQueue message_queue; 242 DOMMessageQueue message_queue;
243 std::string message; 243 std::string message;
244 ASSERT_TRUE(message_queue.WaitForMessage(&message)); 244 ASSERT_TRUE(message_queue.WaitForMessage(&message));
245 EXPECT_EQ("true", message); 245 EXPECT_EQ("true", message);
246 } 246 }
247 247
248 } // namespace 248 } // namespace
249 } // namespace content 249 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/webui/web_ui_impl.h ('k') | content/browser/zygote_host/zygote_communication_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698