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

Side by Side Diff: extensions/shell/browser/shell_content_browser_client.cc

Issue 2618393003: Remove ScopedVector from ContentBrowserClient. (Closed)
Patch Set: rebase Created 3 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/shell/browser/shell_content_browser_client.h" 5 #include "extensions/shell/browser/shell_content_browser_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( 224 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem(
225 additional_allowed_schemes); 225 additional_allowed_schemes);
226 additional_allowed_schemes->push_back(kExtensionScheme); 226 additional_allowed_schemes->push_back(kExtensionScheme);
227 } 227 }
228 228
229 content::DevToolsManagerDelegate* 229 content::DevToolsManagerDelegate*
230 ShellContentBrowserClient::GetDevToolsManagerDelegate() { 230 ShellContentBrowserClient::GetDevToolsManagerDelegate() {
231 return new content::ShellDevToolsManagerDelegate(GetBrowserContext()); 231 return new content::ShellDevToolsManagerDelegate(GetBrowserContext());
232 } 232 }
233 233
234 ScopedVector<content::NavigationThrottle> 234 std::vector<std::unique_ptr<content::NavigationThrottle>>
235 ShellContentBrowserClient::CreateThrottlesForNavigation( 235 ShellContentBrowserClient::CreateThrottlesForNavigation(
236 content::NavigationHandle* navigation_handle) { 236 content::NavigationHandle* navigation_handle) {
237 ScopedVector<content::NavigationThrottle> throttles; 237 std::vector<std::unique_ptr<content::NavigationThrottle>> throttles;
238 throttles.push_back(new ExtensionNavigationThrottle(navigation_handle)); 238 throttles.push_back(
239 base::MakeUnique<ExtensionNavigationThrottle>(navigation_handle));
239 return throttles; 240 return throttles;
240 } 241 }
241 242
242 std::unique_ptr<content::NavigationUIData> 243 std::unique_ptr<content::NavigationUIData>
243 ShellContentBrowserClient::GetNavigationUIData( 244 ShellContentBrowserClient::GetNavigationUIData(
244 content::NavigationHandle* navigation_handle) { 245 content::NavigationHandle* navigation_handle) {
245 return base::MakeUnique<ShellNavigationUIData>(navigation_handle); 246 return base::MakeUnique<ShellNavigationUIData>(navigation_handle);
246 } 247 }
247 248
248 ShellBrowserMainParts* ShellContentBrowserClient::CreateShellBrowserMainParts( 249 ShellBrowserMainParts* ShellContentBrowserClient::CreateShellBrowserMainParts(
(...skipping 22 matching lines...) Expand all
271 272
272 const Extension* ShellContentBrowserClient::GetExtension( 273 const Extension* ShellContentBrowserClient::GetExtension(
273 content::SiteInstance* site_instance) { 274 content::SiteInstance* site_instance) {
274 ExtensionRegistry* registry = 275 ExtensionRegistry* registry =
275 ExtensionRegistry::Get(site_instance->GetBrowserContext()); 276 ExtensionRegistry::Get(site_instance->GetBrowserContext());
276 return registry->enabled_extensions().GetExtensionOrAppByURL( 277 return registry->enabled_extensions().GetExtensionOrAppByURL(
277 site_instance->GetSiteURL()); 278 site_instance->GetSiteURL());
278 } 279 }
279 280
280 } // namespace extensions 281 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_content_browser_client.h ('k') | storage/browser/fileapi/file_system_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698