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

Side by Side Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/content_settings/content_setting_bubble_model.h" 5 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 328
329 if (content_type() == CONTENT_SETTINGS_TYPE_COOKIES) { 329 if (content_type() == CONTENT_SETTINGS_TYPE_COOKIES) {
330 content_settings::CookieSettings* cookie_settings = 330 content_settings::CookieSettings* cookie_settings =
331 CookieSettingsFactory::GetForProfile(profile()).get(); 331 CookieSettingsFactory::GetForProfile(profile()).get();
332 setting = cookie_settings->GetCookieSetting( 332 setting = cookie_settings->GetCookieSetting(
333 url, url, true, &setting_source); 333 url, url, true, &setting_source);
334 } else { 334 } else {
335 SettingInfo info; 335 SettingInfo info;
336 HostContentSettingsMap* map = 336 HostContentSettingsMap* map =
337 HostContentSettingsMapFactory::GetForProfile(profile()); 337 HostContentSettingsMapFactory::GetForProfile(profile());
338 scoped_ptr<base::Value> value = 338 std::unique_ptr<base::Value> value =
339 map->GetWebsiteSetting(url, url, content_type(), std::string(), &info); 339 map->GetWebsiteSetting(url, url, content_type(), std::string(), &info);
340 setting = content_settings::ValueToContentSetting(value.get()); 340 setting = content_settings::ValueToContentSetting(value.get());
341 setting_source = info.source; 341 setting_source = info.source;
342 setting_is_wildcard = 342 setting_is_wildcard =
343 info.primary_pattern == ContentSettingsPattern::Wildcard() && 343 info.primary_pattern == ContentSettingsPattern::Wildcard() &&
344 info.secondary_pattern == ContentSettingsPattern::Wildcard(); 344 info.secondary_pattern == ContentSettingsPattern::Wildcard();
345 } 345 }
346 346
347 if (content_type() == CONTENT_SETTINGS_TYPE_PLUGINS && 347 if (content_type() == CONTENT_SETTINGS_TYPE_PLUGINS &&
348 setting == CONTENT_SETTING_ALLOW && 348 setting == CONTENT_SETTING_ALLOW &&
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 ContentSettingBubbleModel::AsSimpleBubbleModel() { 1313 ContentSettingBubbleModel::AsSimpleBubbleModel() {
1314 // In general, bubble models might not inherit from the simple bubble model. 1314 // In general, bubble models might not inherit from the simple bubble model.
1315 return nullptr; 1315 return nullptr;
1316 } 1316 }
1317 1317
1318 ContentSettingMediaStreamBubbleModel* 1318 ContentSettingMediaStreamBubbleModel*
1319 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { 1319 ContentSettingBubbleModel::AsMediaStreamBubbleModel() {
1320 // In general, bubble models might not inherit from the media bubble model. 1320 // In general, bubble models might not inherit from the media bubble model.
1321 return nullptr; 1321 return nullptr;
1322 } 1322 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/confirm_bubble.h ('k') | chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698