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

Side by Side Diff: components/content_settings/core/browser/content_settings_registry.cc

Issue 2257793002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/content_settings/core/browser/content_settings_registry.h" 5 #include "components/content_settings/core/browser/content_settings_registry.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 type, name, std::move(default_value), sync_status, 351 type, name, std::move(default_value), sync_status,
352 WebsiteSettingsInfo::NOT_LOSSY, scoping_type, platforms, 352 WebsiteSettingsInfo::NOT_LOSSY, scoping_type, platforms,
353 WebsiteSettingsInfo::INHERIT_IN_INCOGNITO); 353 WebsiteSettingsInfo::INHERIT_IN_INCOGNITO);
354 354
355 // WebsiteSettingsInfo::Register() will return nullptr if content setting type 355 // WebsiteSettingsInfo::Register() will return nullptr if content setting type
356 // is not used on the current platform and doesn't need to be registered. 356 // is not used on the current platform and doesn't need to be registered.
357 if (!website_settings_info) 357 if (!website_settings_info)
358 return; 358 return;
359 359
360 DCHECK(!base::ContainsKey(content_settings_info_, type)); 360 DCHECK(!base::ContainsKey(content_settings_info_, type));
361 content_settings_info_[type] = base::WrapUnique( 361 content_settings_info_[type] = base::MakeUnique<ContentSettingsInfo>(
362 new ContentSettingsInfo(website_settings_info, whitelisted_schemes, 362 website_settings_info, whitelisted_schemes, valid_settings,
363 valid_settings, incognito_behavior)); 363 incognito_behavior);
364 } 364 }
365 365
366 } // namespace content_settings 366 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698