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

Side by Side Diff: chrome/browser/extensions/api/permissions/permissions_api_helpers.cc

Issue 2257113002: 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 (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/extensions/api/permissions/permissions_api_helpers.h" 5 #include "chrome/browser/extensions/api/permissions/permissions_api_helpers.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 *error = ErrorUtils::FormatErrorMessage( 139 *error = ErrorUtils::FormatErrorMessage(
140 kInvalidOrigin, 140 kInvalidOrigin,
141 *it, 141 *it,
142 URLPattern::GetParseResultString(parse_result)); 142 URLPattern::GetParseResultString(parse_result));
143 return NULL; 143 return NULL;
144 } 144 }
145 origins.AddPattern(origin); 145 origins.AddPattern(origin);
146 } 146 }
147 } 147 }
148 148
149 return base::WrapUnique( 149 return base::MakeUnique<PermissionSet>(apis, manifest_permissions, origins,
150 new PermissionSet(apis, manifest_permissions, origins, URLPatternSet())); 150 URLPatternSet());
151 } 151 }
152 152
153 } // namespace permissions_api_helpers 153 } // namespace permissions_api_helpers
154 } // namespace extensions 154 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698