| OLD | NEW |
| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 std::unique_ptr<ResettableSettingsSnapshot> settings_snapshot, | 169 std::unique_ptr<ResettableSettingsSnapshot> settings_snapshot, |
| 170 std::unique_ptr<BrandcodedDefaultSettings> default_settings, | 170 std::unique_ptr<BrandcodedDefaultSettings> default_settings, |
| 171 std::unique_ptr<ProfileResetter> profile_resetter) { | 171 std::unique_ptr<ProfileResetter> profile_resetter) { |
| 172 return base::WrapUnique(new SettingsResetPromptModel( | 172 return base::WrapUnique(new SettingsResetPromptModel( |
| 173 profile, std::move(prompt_config), std::move(settings_snapshot), | 173 profile, std::move(prompt_config), std::move(settings_snapshot), |
| 174 std::move(default_settings), std::move(profile_resetter))); | 174 std::move(default_settings), std::move(profile_resetter))); |
| 175 } | 175 } |
| 176 | 176 |
| 177 SettingsResetPromptModel::~SettingsResetPromptModel() {} | 177 SettingsResetPromptModel::~SettingsResetPromptModel() {} |
| 178 | 178 |
| 179 Profile* SettingsResetPromptModel::profile() const { |
| 180 return profile_; |
| 181 } |
| 182 |
| 179 SettingsResetPromptConfig* SettingsResetPromptModel::config() const { | 183 SettingsResetPromptConfig* SettingsResetPromptModel::config() const { |
| 180 return prompt_config_.get(); | 184 return prompt_config_.get(); |
| 181 } | 185 } |
| 182 | 186 |
| 183 bool SettingsResetPromptModel::ShouldPromptForReset() const { | 187 bool SettingsResetPromptModel::ShouldPromptForReset() const { |
| 184 return homepage_reset_state() == RESET_REQUIRED || | 188 return homepage_reset_state() == RESET_REQUIRED || |
| 185 default_search_reset_state() == RESET_REQUIRED || | 189 default_search_reset_state() == RESET_REQUIRED || |
| 186 startup_urls_reset_state() == RESET_REQUIRED; | 190 startup_urls_reset_state() == RESET_REQUIRED; |
| 187 } | 191 } |
| 188 | 192 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 (startup_urls_reset_state_ == RESET_REQUIRED && | 403 (startup_urls_reset_state_ == RESET_REQUIRED && |
| 400 !overrides->startup_pages.empty())) { | 404 !overrides->startup_pages.empty())) { |
| 401 ExtensionInfo extension_info(extension); | 405 ExtensionInfo extension_info(extension); |
| 402 extensions_to_disable_.insert( | 406 extensions_to_disable_.insert( |
| 403 std::make_pair(extension_info.id, extension_info)); | 407 std::make_pair(extension_info.id, extension_info)); |
| 404 } | 408 } |
| 405 } | 409 } |
| 406 } | 410 } |
| 407 | 411 |
| 408 } // namespace safe_browsing. | 412 } // namespace safe_browsing. |
| OLD | NEW |