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

Side by Side Diff: chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model.cc

Issue 2821193005: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/safe_browsing (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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/safe_browsing/settings_reset_prompt/settings_reset_prom pt_model.h" 5 #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prom pt_model.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 DCHECK(!config_fetcher_->IsActive()); 137 DCHECK(!config_fetcher_->IsActive());
138 138
139 PostCallbackAndDeleteSelf(config_fetcher_->GetSettings()); 139 PostCallbackAndDeleteSelf(config_fetcher_->GetSettings());
140 } 140 }
141 141
142 void DefaultSettingsFetcher::PostCallbackAndDeleteSelf( 142 void DefaultSettingsFetcher::PostCallbackAndDeleteSelf(
143 std::unique_ptr<BrandcodedDefaultSettings> default_settings) { 143 std::unique_ptr<BrandcodedDefaultSettings> default_settings) {
144 DCHECK(default_settings); 144 DCHECK(default_settings);
145 content::BrowserThread::PostTask( 145 content::BrowserThread::PostTask(
146 content::BrowserThread::UI, FROM_HERE, 146 content::BrowserThread::UI, FROM_HERE,
147 base::Bind(std::move(callback_), base::Passed(&default_settings))); 147 base::BindOnce(std::move(callback_), base::Passed(&default_settings)));
148 delete this; 148 delete this;
149 } 149 }
150 150
151 const extensions::Extension* GetExtension( 151 const extensions::Extension* GetExtension(
152 Profile* profile, 152 Profile* profile,
153 const extensions::ExtensionId& extension_id) { 153 const extensions::ExtensionId& extension_id) {
154 return extensions::ExtensionRegistry::Get(profile)->GetInstalledExtension( 154 return extensions::ExtensionRegistry::Get(profile)->GetInstalledExtension(
155 extension_id); 155 extension_id);
156 } 156 }
157 157
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 GetExtension(profile_, extension_id); 553 GetExtension(profile_, extension_id);
554 if (extension && management_policy->MustRemainEnabled(extension, nullptr)) 554 if (extension && management_policy->MustRemainEnabled(extension, nullptr))
555 return true; 555 return true;
556 } 556 }
557 } 557 }
558 558
559 return false; 559 return false;
560 } 560 }
561 561
562 } // namespace safe_browsing. 562 } // namespace safe_browsing.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698