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

Side by Side Diff: chrome/browser/ui/browser_navigator.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/browser_navigator.h" 5 #include "chrome/browser/ui/browser_navigator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 target_contents_owner_.reset(params_->target_contents); 323 target_contents_owner_.reset(params_->target_contents);
324 } 324 }
325 325
326 // Relinquishes ownership of |params_|' target_contents. 326 // Relinquishes ownership of |params_|' target_contents.
327 WebContents* ReleaseOwnership() { 327 WebContents* ReleaseOwnership() {
328 return target_contents_owner_.release(); 328 return target_contents_owner_.release();
329 } 329 }
330 330
331 private: 331 private:
332 chrome::NavigateParams* params_; 332 chrome::NavigateParams* params_;
333 scoped_ptr<WebContents> target_contents_owner_; 333 std::unique_ptr<WebContents> target_contents_owner_;
334 DISALLOW_COPY_AND_ASSIGN(ScopedTargetContentsOwner); 334 DISALLOW_COPY_AND_ASSIGN(ScopedTargetContentsOwner);
335 }; 335 };
336 336
337 content::WebContents* CreateTargetContents(const chrome::NavigateParams& params, 337 content::WebContents* CreateTargetContents(const chrome::NavigateParams& params,
338 const GURL& url) { 338 const GURL& url) {
339 WebContents::CreateParams create_params( 339 WebContents::CreateParams create_params(
340 params.browser->profile(), 340 params.browser->profile(),
341 params.source_site_instance 341 params.source_site_instance
342 ? params.source_site_instance 342 ? params.source_site_instance
343 : tab_util::GetSiteInstanceForNewTab(params.browser->profile(), url)); 343 : tab_util::GetSiteInstanceForNewTab(params.browser->profile(), url));
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 bool reverse_on_redirect = false; 646 bool reverse_on_redirect = false;
647 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary( 647 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary(
648 &rewritten_url, browser_context, &reverse_on_redirect); 648 &rewritten_url, browser_context, &reverse_on_redirect);
649 649
650 // Some URLs are mapped to uber subpages. Do not allow them in incognito. 650 // Some URLs are mapped to uber subpages. Do not allow them in incognito.
651 return !(rewritten_url.scheme() == content::kChromeUIScheme && 651 return !(rewritten_url.scheme() == content::kChromeUIScheme &&
652 rewritten_url.host() == chrome::kChromeUIUberHost); 652 rewritten_url.host() == chrome::kChromeUIUberHost);
653 } 653 }
654 654
655 } // namespace chrome 655 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_instant_controller_unittest.cc ('k') | chrome/browser/ui/browser_tabrestore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698