| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/settings/site_settings_handler.h" | 5 #include "chrome/browser/ui/webui/settings/site_settings_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 Profile* incognito = profile_->GetOffTheRecordProfile(); | 569 Profile* incognito = profile_->GetOffTheRecordProfile(); |
| 570 map = HostContentSettingsMapFactory::GetForProfile(incognito); | 570 map = HostContentSettingsMapFactory::GetForProfile(incognito); |
| 571 extension_registry = extensions::ExtensionRegistry::Get(incognito); | 571 extension_registry = extensions::ExtensionRegistry::Get(incognito); |
| 572 site_settings::GetExceptionsFromHostContentSettingsMap( | 572 site_settings::GetExceptionsFromHostContentSettingsMap( |
| 573 map, content_type, extension_registry, web_ui(), /*incognito=*/true, | 573 map, content_type, extension_registry, web_ui(), /*incognito=*/true, |
| 574 /*filter=*/&site, exceptions.get()); | 574 /*filter=*/&site, exceptions.get()); |
| 575 } | 575 } |
| 576 } | 576 } |
| 577 | 577 |
| 578 if (!exceptions->GetSize()) { | 578 if (!exceptions->GetSize()) { |
| 579 RejectJavascriptCallback(*callback_id, *base::Value::CreateNullValue()); | 579 RejectJavascriptCallback(*callback_id, base::Value()); |
| 580 return; | 580 return; |
| 581 } | 581 } |
| 582 | 582 |
| 583 // We only need a single response element. | 583 // We only need a single response element. |
| 584 const base::DictionaryValue* exception = nullptr; | 584 const base::DictionaryValue* exception = nullptr; |
| 585 exceptions->GetDictionary(0, &exception); | 585 exceptions->GetDictionary(0, &exception); |
| 586 ResolveJavascriptCallback(*callback_id, *exception); | 586 ResolveJavascriptCallback(*callback_id, *exception); |
| 587 } | 587 } |
| 588 | 588 |
| 589 void SiteSettingsHandler::HandleIsPatternValid( | 589 void SiteSettingsHandler::HandleIsPatternValid( |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 origin = content::kUnreachableWebDataURL; | 718 origin = content::kUnreachableWebDataURL; |
| 719 } | 719 } |
| 720 | 720 |
| 721 content::HostZoomMap* host_zoom_map; | 721 content::HostZoomMap* host_zoom_map; |
| 722 host_zoom_map = content::HostZoomMap::GetDefaultForBrowserContext(profile_); | 722 host_zoom_map = content::HostZoomMap::GetDefaultForBrowserContext(profile_); |
| 723 double default_level = host_zoom_map->GetDefaultZoomLevel(); | 723 double default_level = host_zoom_map->GetDefaultZoomLevel(); |
| 724 host_zoom_map->SetZoomLevelForHost(origin, default_level); | 724 host_zoom_map->SetZoomLevelForHost(origin, default_level); |
| 725 } | 725 } |
| 726 | 726 |
| 727 } // namespace settings | 727 } // namespace settings |
| OLD | NEW |