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

Side by Side Diff: chrome/browser/extensions/updater/extension_cache_impl.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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 "chrome/browser/extensions/updater/extension_cache_impl.h" 5 #include "chrome/browser/extensions/updater/extension_cache_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "base/sequenced_task_runner.h" 13 #include "base/sequenced_task_runner.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/threading/sequenced_worker_pool.h" 15 #include "base/threading/sequenced_worker_pool.h"
16 #include "chrome/browser/chrome_notification_types.h" 16 #include "chrome/browser/chrome_notification_types.h"
17 #include "chrome/browser/extensions/crx_installer.h" 17 #include "chrome/browser/extensions/crx_installer.h"
18 #include "chrome/browser/extensions/updater/extension_cache_delegate.h" 18 #include "chrome/browser/extensions/updater/extension_cache_delegate.h"
19 #include "chrome/browser/extensions/updater/local_extension_cache.h" 19 #include "chrome/browser/extensions/updater/local_extension_cache.h"
20 #include "chrome/common/extensions/extension_constants.h" 20 #include "chrome/common/extensions/extension_constants.h"
21 #include "content/public/browser/browser_thread.h" 21 #include "content/public/browser/browser_thread.h"
22 #include "content/public/browser/notification_details.h" 22 #include "content/public/browser/notification_details.h"
23 #include "content/public/browser/notification_service.h" 23 #include "content/public/browser/notification_service.h"
24 #include "content/public/browser/notification_source.h" 24 #include "content/public/browser/notification_source.h"
25 #include "extensions/browser/install/crx_install_error.h" 25 #include "extensions/browser/install/crx_install_error.h"
26 26
27 namespace extensions { 27 namespace extensions {
28 28
29 ExtensionCacheImpl::ExtensionCacheImpl( 29 ExtensionCacheImpl::ExtensionCacheImpl(
30 scoped_ptr<ExtensionCacheDelegate> delegate) 30 std::unique_ptr<ExtensionCacheDelegate> delegate)
31 : cache_(new LocalExtensionCache( 31 : cache_(new LocalExtensionCache(
32 delegate->GetCacheDir(), 32 delegate->GetCacheDir(),
33 delegate->GetMaximumCacheSize(), 33 delegate->GetMaximumCacheSize(),
34 delegate->GetMaximumCacheAge(), 34 delegate->GetMaximumCacheAge(),
35 content::BrowserThread::GetBlockingPool() 35 content::BrowserThread::GetBlockingPool()
36 ->GetSequencedTaskRunnerWithShutdownBehavior( 36 ->GetSequencedTaskRunnerWithShutdownBehavior(
37 content::BrowserThread::GetBlockingPool()->GetSequenceToken(), 37 content::BrowserThread::GetBlockingPool()->GetSequenceToken(),
38 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))), 38 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))),
39 weak_ptr_factory_(this) { 39 weak_ptr_factory_(this) {
40 notification_registrar_.Add( 40 notification_registrar_.Add(
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 break; 142 break;
143 } 143 }
144 144
145 default: 145 default:
146 NOTREACHED(); 146 NOTREACHED();
147 } 147 }
148 } 148 }
149 149
150 } // namespace extensions 150 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/updater/extension_cache_impl.h ('k') | chrome/browser/extensions/updater/extension_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698