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

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

Issue 2825963003: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/extensions (Closed)
Patch Set: Created 3 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_fake.h" 5 #include "chrome/browser/extensions/updater/extension_cache_fake.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 void ExtensionCacheFake::PutExtension(const std::string& id, 53 void ExtensionCacheFake::PutExtension(const std::string& id,
54 const std::string& expected_hash, 54 const std::string& expected_hash,
55 const base::FilePath& file_path, 55 const base::FilePath& file_path,
56 const std::string& version, 56 const std::string& version,
57 const PutExtensionCallback& callback) { 57 const PutExtensionCallback& callback) {
58 if (base::ContainsKey(allowed_extensions_, id)) { 58 if (base::ContainsKey(allowed_extensions_, id)) {
59 cache_[id].first = version; 59 cache_[id].first = version;
60 cache_[id].second = file_path; 60 cache_[id].second = file_path;
61 content::BrowserThread::PostTask( 61 content::BrowserThread::PostTask(
62 content::BrowserThread::UI, 62 content::BrowserThread::UI, FROM_HERE,
63 FROM_HERE, 63 base::BindOnce(callback, file_path, false));
64 base::Bind(callback, file_path, false));
65 } else { 64 } else {
66 callback.Run(file_path, true); 65 callback.Run(file_path, true);
67 } 66 }
68 } 67 }
69 68
70 } // namespace extensions 69 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/unpacked_installer.cc ('k') | chrome/browser/extensions/updater/extension_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698