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

Side by Side Diff: content/browser/frame_host/frame_tree_node.cc

Issue 2256173002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace a WrapUnique() nested inside a MakeUnique() Created 4 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/frame_host/frame_tree_node.h" 5 #include "content/browser/frame_host/frame_tree_node.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 void FrameTreeNode::SetOpener(FrameTreeNode* opener) { 192 void FrameTreeNode::SetOpener(FrameTreeNode* opener) {
193 if (opener_) { 193 if (opener_) {
194 opener_->RemoveObserver(opener_observer_.get()); 194 opener_->RemoveObserver(opener_observer_.get());
195 opener_observer_.reset(); 195 opener_observer_.reset();
196 } 196 }
197 197
198 opener_ = opener; 198 opener_ = opener;
199 199
200 if (opener_) { 200 if (opener_) {
201 if (!opener_observer_) 201 if (!opener_observer_)
202 opener_observer_ = base::WrapUnique(new OpenerDestroyedObserver(this)); 202 opener_observer_ = base::MakeUnique<OpenerDestroyedObserver>(this);
203 opener_->AddObserver(opener_observer_.get()); 203 opener_->AddObserver(opener_observer_.get());
204 } 204 }
205 } 205 }
206 206
207 void FrameTreeNode::SetCurrentURL(const GURL& url) { 207 void FrameTreeNode::SetCurrentURL(const GURL& url) {
208 if (!has_committed_real_load_ && url != GURL(url::kAboutBlankURL)) 208 if (!has_committed_real_load_ && url != GURL(url::kAboutBlankURL))
209 has_committed_real_load_ = true; 209 has_committed_real_load_ = true;
210 current_frame_host()->set_last_committed_url(url); 210 current_frame_host()->set_last_committed_url(url);
211 blame_context_.TakeSnapshot(); 211 blame_context_.TakeSnapshot();
212 } 212 }
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 } 494 }
495 return parent_->child_at(i + relative_offset); 495 return parent_->child_at(i + relative_offset);
496 } 496 }
497 } 497 }
498 498
499 NOTREACHED() << "FrameTreeNode not found in its parent's children."; 499 NOTREACHED() << "FrameTreeNode not found in its parent's children.";
500 return nullptr; 500 return nullptr;
501 } 501 }
502 502
503 } // namespace content 503 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698