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

Side by Side Diff: content/browser/devtools/protocol/service_worker_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/service_worker_handler.h" 5 #include "content/browser/devtools/protocol/service_worker_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/containers/scoped_ptr_hash_map.h" 8 #include "base/containers/scoped_ptr_hash_map.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 return; 255 return;
256 } 256 }
257 StoragePartition* partition = BrowserContext::GetStoragePartition( 257 StoragePartition* partition = BrowserContext::GetStoragePartition(
258 render_frame_host->GetProcess()->GetBrowserContext(), 258 render_frame_host->GetProcess()->GetBrowserContext(),
259 render_frame_host->GetSiteInstance()); 259 render_frame_host->GetSiteInstance());
260 DCHECK(partition); 260 DCHECK(partition);
261 context_ = static_cast<ServiceWorkerContextWrapper*>( 261 context_ = static_cast<ServiceWorkerContextWrapper*>(
262 partition->GetServiceWorkerContext()); 262 partition->GetServiceWorkerContext());
263 } 263 }
264 264
265 void ServiceWorkerHandler::SetClient(scoped_ptr<Client> client) { 265 void ServiceWorkerHandler::SetClient(std::unique_ptr<Client> client) {
266 client_.swap(client); 266 client_.swap(client);
267 } 267 }
268 268
269 void ServiceWorkerHandler::UpdateHosts() { 269 void ServiceWorkerHandler::UpdateHosts() {
270 if (!enabled_) 270 if (!enabled_)
271 return; 271 return;
272 272
273 urls_.clear(); 273 urls_.clear();
274 BrowserContext* browser_context = nullptr; 274 BrowserContext* browser_context = nullptr;
275 if (render_frame_host_) { 275 if (render_frame_host_) {
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 } 589 }
590 590
591 void ServiceWorkerHandler::ClearForceUpdate() { 591 void ServiceWorkerHandler::ClearForceUpdate() {
592 if (context_) 592 if (context_)
593 context_->SetForceUpdateOnPageLoad(false); 593 context_->SetForceUpdateOnPageLoad(false);
594 } 594 }
595 595
596 } // namespace service_worker 596 } // namespace service_worker
597 } // namespace devtools 597 } // namespace devtools
598 } // namespace content 598 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol/service_worker_handler.h ('k') | content/browser/devtools/protocol/system_info_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698