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

Side by Side Diff: content/browser/devtools/protocol/network_handler.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 "content/browser/devtools/protocol/network_handler.h" 5 #include "content/browser/devtools/protocol/network_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 NetworkHandler::NetworkHandler() : host_(nullptr), weak_factory_(this) { 194 NetworkHandler::NetworkHandler() : host_(nullptr), weak_factory_(this) {
195 } 195 }
196 196
197 NetworkHandler::~NetworkHandler() { 197 NetworkHandler::~NetworkHandler() {
198 } 198 }
199 199
200 void NetworkHandler::SetRenderFrameHost(RenderFrameHostImpl* host) { 200 void NetworkHandler::SetRenderFrameHost(RenderFrameHostImpl* host) {
201 host_ = host; 201 host_ = host;
202 } 202 }
203 203
204 void NetworkHandler::SetClient(scoped_ptr<Client> client) { 204 void NetworkHandler::SetClient(std::unique_ptr<Client> client) {
205 client_.swap(client); 205 client_.swap(client);
206 } 206 }
207 207
208 Response NetworkHandler::ClearBrowserCache() { 208 Response NetworkHandler::ClearBrowserCache() {
209 if (host_) 209 if (host_)
210 GetContentClient()->browser()->ClearCache(host_); 210 GetContentClient()->browser()->ClearCache(host_);
211 return Response::OK(); 211 return Response::OK();
212 } 212 }
213 213
214 Response NetworkHandler::ClearBrowserCookies() { 214 Response NetworkHandler::ClearBrowserCookies() {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 return Response::InternalError("Could not connect to view"); 330 return Response::InternalError("Could not connect to view");
331 WebContents* web_contents = WebContents::FromRenderFrameHost(host_); 331 WebContents* web_contents = WebContents::FromRenderFrameHost(host_);
332 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( 332 web_contents->GetDelegate()->ShowCertificateViewerInDevTools(
333 web_contents, certificate_id); 333 web_contents, certificate_id);
334 return Response::OK(); 334 return Response::OK();
335 } 335 }
336 336
337 } // namespace network 337 } // namespace network
338 } // namespace devtools 338 } // namespace devtools
339 } // namespace content 339 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol/network_handler.h ('k') | content/browser/devtools/protocol/page_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698