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

Side by Side Diff: blimp/engine/session/blimp_engine_session.cc

Issue 2250433006: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 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 "blimp/engine/session/blimp_engine_session.h" 5 #include "blimp/engine/session/blimp_engine_session.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 base::WeakPtr<BlobChannelSender> blob_channel_sender, 180 base::WeakPtr<BlobChannelSender> blob_channel_sender,
181 const std::string& client_token) { 181 const std::string& client_token) {
182 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); 182 DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
183 DCHECK(!connection_manager_); 183 DCHECK(!connection_manager_);
184 // Plumb authenticated connections from the authentication handler 184 // Plumb authenticated connections from the authentication handler
185 // to |this| (which will then pass it to |connection_handler_|. 185 // to |this| (which will then pass it to |connection_handler_|.
186 authentication_handler_ = 186 authentication_handler_ =
187 base::MakeUnique<EngineAuthenticationHandler>(this, client_token); 187 base::MakeUnique<EngineAuthenticationHandler>(this, client_token);
188 188
189 // Plumb unauthenticated connections to |authentication_handler_|. 189 // Plumb unauthenticated connections to |authentication_handler_|.
190 connection_manager_ = base::WrapUnique( 190 connection_manager_ =
191 new EngineConnectionManager(authentication_handler_.get())); 191 base::MakeUnique<EngineConnectionManager>(authentication_handler_.get());
192 192
193 blob_channel_service_ = 193 blob_channel_service_ =
194 base::MakeUnique<BlobChannelService>(blob_channel_sender, ui_task_runner); 194 base::MakeUnique<BlobChannelService>(blob_channel_sender, ui_task_runner);
195 195
196 // Adds BlimpTransports to connection_manager_. 196 // Adds BlimpTransports to connection_manager_.
197 net::IPEndPoint address(GetIPv4AnyAddress(), GetListeningPort()); 197 net::IPEndPoint address(GetIPv4AnyAddress(), GetListeningPort());
198 TCPEngineTransport* transport = new TCPEngineTransport(address, net_log_); 198 TCPEngineTransport* transport = new TCPEngineTransport(address, net_log_);
199 connection_manager_->AddTransport(base::WrapUnique(transport)); 199 connection_manager_->AddTransport(base::WrapUnique(transport));
200 200
201 transport->GetLocalAddress(&address); 201 transport->GetLocalAddress(&address);
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 std::unique_ptr<content::WebContents> new_contents, 573 std::unique_ptr<content::WebContents> new_contents,
574 const int target_tab_id) { 574 const int target_tab_id) {
575 new_contents->SetDelegate(this); 575 new_contents->SetDelegate(this);
576 576
577 aura::Window* parent = window_tree_host_->window(); 577 aura::Window* parent = window_tree_host_->window();
578 aura::Window* content = new_contents->GetNativeView(); 578 aura::Window* content = new_contents->GetNativeView();
579 if (!parent->Contains(content)) 579 if (!parent->Contains(content))
580 parent->AddChild(content); 580 parent->AddChild(content);
581 content->Show(); 581 content->Show();
582 582
583 tab_ = base::WrapUnique(new Tab(std::move(new_contents), target_tab_id, 583 tab_ = base::MakeUnique<Tab>(std::move(new_contents), target_tab_id,
584 &render_widget_feature_, 584 &render_widget_feature_,
585 navigation_message_sender_.get())); 585 navigation_message_sender_.get());
586 } 586 }
587 587
588 } // namespace engine 588 } // namespace engine
589 } // namespace blimp 589 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/engine/renderer/engine_image_serialization_processor.cc ('k') | blimp/net/blimp_message_checkpointer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698