OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/test/browser_side_navigation_test_utils.h" | 5 #include "content/test/browser_side_navigation_test_utils.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/guid.h" | 8 #include "base/guid.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "content/browser/streams/stream.h" | 10 #include "content/browser/streams/stream.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 scoped_ptr<StreamHandle> MakeEmptyStream() { | 59 scoped_ptr<StreamHandle> MakeEmptyStream() { |
60 GURL url(std::string(url::kBlobScheme) + "://" + base::GenerateGUID()); | 60 GURL url(std::string(url::kBlobScheme) + "://" + base::GenerateGUID()); |
61 StreamRegistry* stream_registry = | 61 StreamRegistry* stream_registry = |
62 browser_side_navigation_test_utils.Get()->stream_registry(); | 62 browser_side_navigation_test_utils.Get()->stream_registry(); |
63 scoped_refptr<Stream> stream(new Stream(stream_registry, NULL, url)); | 63 scoped_refptr<Stream> stream(new Stream(stream_registry, NULL, url)); |
64 stream->Finalize(); | 64 stream->Finalize(); |
65 return stream->CreateHandle(); | 65 return stream->CreateHandle(); |
66 } | 66 } |
67 | 67 |
68 void EnableBrowserSideNavigation() { | 68 void EnableBrowserSideNavigation() { |
69 CommandLine::ForCurrentProcess()->AppendSwitch( | 69 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
70 switches::kEnableBrowserSideNavigation); | 70 switches::kEnableBrowserSideNavigation); |
71 } | 71 } |
72 | 72 |
73 } // namespace content | 73 } // namespace content |
OLD | NEW |