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

Side by Side Diff: chrome/browser/ui/search/new_tab_page_interceptor_service.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 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 "chrome/browser/ui/search/new_tab_page_interceptor_service.h" 5 #include "chrome/browser/ui/search/new_tab_page_interceptor_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 void NewTabPageInterceptorService::OnTemplateURLServiceChanged() { 110 void NewTabPageInterceptorService::OnTemplateURLServiceChanged() {
111 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 111 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
112 GURL new_tab_page_url(search::GetNewTabPageURL(profile_)); 112 GURL new_tab_page_url(search::GetNewTabPageURL(profile_));
113 content::BrowserThread::PostTask( 113 content::BrowserThread::PostTask(
114 content::BrowserThread::IO, FROM_HERE, 114 content::BrowserThread::IO, FROM_HERE,
115 base::Bind(&NewTabPageInterceptor::SetNewTabPageURL, interceptor_, 115 base::Bind(&NewTabPageInterceptor::SetNewTabPageURL, interceptor_,
116 new_tab_page_url)); 116 new_tab_page_url));
117 } 117 }
118 118
119 scoped_ptr<net::URLRequestInterceptor> 119 std::unique_ptr<net::URLRequestInterceptor>
120 NewTabPageInterceptorService::CreateInterceptor() { 120 NewTabPageInterceptorService::CreateInterceptor() {
121 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 121 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
122 scoped_ptr<NewTabPageInterceptor> interceptor( 122 std::unique_ptr<NewTabPageInterceptor> interceptor(
123 new NewTabPageInterceptor(search::GetNewTabPageURL(profile_))); 123 new NewTabPageInterceptor(search::GetNewTabPageURL(profile_)));
124 interceptor_ = interceptor->GetWeakPtr(); 124 interceptor_ = interceptor->GetWeakPtr();
125 return std::move(interceptor); 125 return std::move(interceptor);
126 } 126 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/new_tab_page_interceptor_service.h ('k') | chrome/browser/ui/search/search_ipc_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698