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

Side by Side Diff: content/browser/devtools/protocol/security_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 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 "content/browser/devtools/protocol/security_handler.h" 5 #include "content/browser/devtools/protocol/security_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" 9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
10 #include "content/public/browser/security_style_explanations.h" 10 #include "content/public/browser/security_style_explanations.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } // namespace 56 } // namespace
57 57
58 SecurityHandler::SecurityHandler() 58 SecurityHandler::SecurityHandler()
59 : enabled_(false), 59 : enabled_(false),
60 host_(nullptr) { 60 host_(nullptr) {
61 } 61 }
62 62
63 SecurityHandler::~SecurityHandler() { 63 SecurityHandler::~SecurityHandler() {
64 } 64 }
65 65
66 void SecurityHandler::SetClient(scoped_ptr<Client> client) { 66 void SecurityHandler::SetClient(std::unique_ptr<Client> client) {
67 client_.swap(client); 67 client_.swap(client);
68 } 68 }
69 69
70 void SecurityHandler::AttachToRenderFrameHost() { 70 void SecurityHandler::AttachToRenderFrameHost() {
71 DCHECK(host_); 71 DCHECK(host_);
72 WebContents* web_contents = WebContents::FromRenderFrameHost(host_); 72 WebContents* web_contents = WebContents::FromRenderFrameHost(host_);
73 WebContentsObserver::Observe(web_contents); 73 WebContentsObserver::Observe(web_contents);
74 74
75 // Send an initial SecurityStyleChanged event. 75 // Send an initial SecurityStyleChanged event.
76 DCHECK(enabled_); 76 DCHECK(enabled_);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 Response SecurityHandler::Disable() { 139 Response SecurityHandler::Disable() {
140 enabled_ = false; 140 enabled_ = false;
141 WebContentsObserver::Observe(nullptr); 141 WebContentsObserver::Observe(nullptr);
142 return Response::OK(); 142 return Response::OK();
143 } 143 }
144 144
145 } // namespace security 145 } // namespace security
146 } // namespace devtools 146 } // namespace devtools
147 } // namespace content 147 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol/security_handler.h ('k') | content/browser/devtools/protocol/service_worker_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698