OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "content/browser/webui/web_ui_url_loader_factory.h" | 5 #include "content/browser/webui/web_ui_url_loader_factory.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 private: | 279 private: |
280 int frame_tree_node_id_; | 280 int frame_tree_node_id_; |
281 StoragePartitionImpl* storage_partition_; | 281 StoragePartitionImpl* storage_partition_; |
282 mojo::BindingSet<mojom::URLLoaderFactory> loader_factory_bindings_; | 282 mojo::BindingSet<mojom::URLLoaderFactory> loader_factory_bindings_; |
283 | 283 |
284 DISALLOW_COPY_AND_ASSIGN(WebUIURLLoaderFactory); | 284 DISALLOW_COPY_AND_ASSIGN(WebUIURLLoaderFactory); |
285 }; | 285 }; |
286 | 286 |
287 } // namespace | 287 } // namespace |
288 | 288 |
289 mojom::URLLoaderFactoryPtr GetWebUIURLLoader(FrameTreeNode* node) { | 289 mojom::URLLoaderFactoryPtr CreateWebUIURLLoader(FrameTreeNode* node) { |
290 int ftn_id = node->frame_tree_node_id(); | 290 int ftn_id = node->frame_tree_node_id(); |
291 if (g_factories.Get()[ftn_id].get() == nullptr) | 291 if (g_factories.Get()[ftn_id].get() == nullptr) |
292 g_factories.Get()[ftn_id] = base::MakeUnique<WebUIURLLoaderFactory>(node); | 292 g_factories.Get()[ftn_id] = base::MakeUnique<WebUIURLLoaderFactory>(node); |
293 return g_factories.Get()[ftn_id]->CreateBinding(); | 293 return g_factories.Get()[ftn_id]->CreateBinding(); |
294 } | 294 } |
295 | 295 |
296 } // namespace content | 296 } // namespace content |
OLD | NEW |