| OLD | NEW |
| 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/ui/webui/options/website_settings_handler.h" | 5 #include "chrome/browser/ui/webui/options/website_settings_handler.h" |
| 6 | 6 |
| 7 #include "apps/app_window_registry.h" | 7 #include "apps/app_window_registry.h" |
| 8 #include "chrome/browser/content_settings/content_settings_utils.h" | 8 #include "chrome/browser/content_settings/content_settings_utils.h" |
| 9 #include "chrome/browser/content_settings/host_content_settings_map.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 void WebsiteSettingsHandler::HandleUpdateSearchResults( | 147 void WebsiteSettingsHandler::HandleUpdateSearchResults( |
| 148 const base::ListValue* args) { | 148 const base::ListValue* args) { |
| 149 bool rv = args->GetString(0, &last_filter_); | 149 bool rv = args->GetString(0, &last_filter_); |
| 150 DCHECK(rv); | 150 DCHECK(rv); |
| 151 | 151 |
| 152 Update(); | 152 Update(); |
| 153 } | 153 } |
| 154 | 154 |
| 155 void WebsiteSettingsHandler::HandleUpdateLocalStorage( | 155 void WebsiteSettingsHandler::HandleUpdateLocalStorage( |
| 156 const base::ListValue* args) { | 156 const base::ListValue* args) { |
| 157 if (!local_storage_) { | 157 if (!local_storage_.get()) { |
| 158 Profile* profile = Profile::FromWebUI(web_ui()); | 158 Profile* profile = Profile::FromWebUI(web_ui()); |
| 159 local_storage_ = new BrowsingDataLocalStorageHelper(profile); | 159 local_storage_ = new BrowsingDataLocalStorageHelper(profile); |
| 160 } | 160 } |
| 161 | 161 |
| 162 last_setting_ = kStorage; | 162 last_setting_ = kStorage; |
| 163 | 163 |
| 164 local_storage_->StartFetching( | 164 local_storage_->StartFetching( |
| 165 base::Bind(&WebsiteSettingsHandler::OnLocalStorageFetched, | 165 base::Bind(&WebsiteSettingsHandler::OnLocalStorageFetched, |
| 166 weak_ptr_factory_.GetWeakPtr())); | 166 weak_ptr_factory_.GetWeakPtr())); |
| 167 } | 167 } |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 | 499 |
| 500 // Load a new BrowsingDataLocalStorageHelper to update. | 500 // Load a new BrowsingDataLocalStorageHelper to update. |
| 501 local_storage_ = new BrowsingDataLocalStorageHelper(profile); | 501 local_storage_ = new BrowsingDataLocalStorageHelper(profile); |
| 502 | 502 |
| 503 local_storage_->StartFetching( | 503 local_storage_->StartFetching( |
| 504 base::Bind(&WebsiteSettingsHandler::OnLocalStorageFetched, | 504 base::Bind(&WebsiteSettingsHandler::OnLocalStorageFetched, |
| 505 weak_ptr_factory_.GetWeakPtr())); | 505 weak_ptr_factory_.GetWeakPtr())); |
| 506 } | 506 } |
| 507 | 507 |
| 508 } // namespace options | 508 } // namespace options |
| OLD | NEW |