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

Side by Side Diff: chrome/browser/ui/webui/settings/site_settings_handler.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" 8 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h"
9 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 9 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 CHECK_EQ(2U, args->GetSize()); 192 CHECK_EQ(2U, args->GetSize());
193 const base::Value* callback_id; 193 const base::Value* callback_id;
194 CHECK(args->Get(0, &callback_id)); 194 CHECK(args->Get(0, &callback_id));
195 double type; 195 double type;
196 CHECK(args->GetDouble(1, &type)); 196 CHECK(args->GetDouble(1, &type));
197 ContentSettingsType content_type = 197 ContentSettingsType content_type =
198 static_cast<ContentSettingsType>(static_cast<int>(type)); 198 static_cast<ContentSettingsType>(static_cast<int>(type));
199 199
200 HostContentSettingsMap* map = 200 HostContentSettingsMap* map =
201 HostContentSettingsMapFactory::GetForProfile(profile_); 201 HostContentSettingsMapFactory::GetForProfile(profile_);
202 scoped_ptr<base::ListValue> exceptions(new base::ListValue); 202 std::unique_ptr<base::ListValue> exceptions(new base::ListValue);
203 site_settings::GetExceptionsFromHostContentSettingsMap( 203 site_settings::GetExceptionsFromHostContentSettingsMap(
204 map, content_type, web_ui(), exceptions.get()); 204 map, content_type, web_ui(), exceptions.get());
205 ResolveJavascriptCallback(*callback_id, *exceptions.get()); 205 ResolveJavascriptCallback(*callback_id, *exceptions.get());
206 } 206 }
207 207
208 void SiteSettingsHandler::HandleResetCategoryPermissionForOrigin( 208 void SiteSettingsHandler::HandleResetCategoryPermissionForOrigin(
209 const base::ListValue* args) { 209 const base::ListValue* args) {
210 CHECK_EQ(3U, args->GetSize()); 210 CHECK_EQ(3U, args->GetSize());
211 std::string primary_pattern; 211 std::string primary_pattern;
212 CHECK(args->GetString(0, &primary_pattern)); 212 CHECK(args->GetString(0, &primary_pattern));
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 HostContentSettingsMapFactory::GetForProfile(profile_); 248 HostContentSettingsMapFactory::GetForProfile(profile_);
249 map->SetContentSettingCustomScope( 249 map->SetContentSettingCustomScope(
250 ContentSettingsPattern::FromString(primary_pattern), 250 ContentSettingsPattern::FromString(primary_pattern),
251 secondary_pattern.empty() ? 251 secondary_pattern.empty() ?
252 ContentSettingsPattern::Wildcard() : 252 ContentSettingsPattern::Wildcard() :
253 ContentSettingsPattern::FromString(secondary_pattern), 253 ContentSettingsPattern::FromString(secondary_pattern),
254 content_type, "", setting); 254 content_type, "", setting);
255 } 255 }
256 256
257 } // namespace settings 257 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698