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

Side by Side Diff: chromecast/shell/browser/cast_content_browser_client.cc

Issue 605033003: Chromecast: adds scheme for local file support in Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chromecast/shell/browser/cast_content_browser_client.h" 5 #include "chromecast/shell/browser/cast_content_browser_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "chromecast/common/cast_paths.h" 10 #include "chromecast/common/cast_paths.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 bool CastContentBrowserClient::IsHandledURL(const GURL& url) { 61 bool CastContentBrowserClient::IsHandledURL(const GURL& url) {
62 if (!url.is_valid()) 62 if (!url.is_valid())
63 return false; 63 return false;
64 64
65 static const char* const kProtocolList[] = { 65 static const char* const kProtocolList[] = {
66 url::kBlobScheme, 66 url::kBlobScheme,
67 url::kFileSystemScheme, 67 url::kFileSystemScheme,
68 content::kChromeUIScheme, 68 content::kChromeUIScheme,
69 content::kChromeDevToolsScheme, 69 content::kChromeDevToolsScheme,
70 url::kDataScheme, 70 url::kDataScheme,
71 #if defined(OS_ANDROID)
72 url::kFileScheme,
73 #endif // defined(OS_ANDROID)
71 }; 74 };
72 75
73 const std::string& scheme = url.scheme(); 76 const std::string& scheme = url.scheme();
74 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { 77 for (size_t i = 0; i < arraysize(kProtocolList); ++i) {
75 if (scheme == kProtocolList[i]) 78 if (scheme == kProtocolList[i])
76 return true; 79 return true;
77 } 80 }
78 return false; 81 return false;
79 } 82 }
80 83
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 << "cast_shell.pak"; 172 << "cast_shell.pak";
170 } 173 }
171 mappings->push_back(content::FileDescriptorInfo( 174 mappings->push_back(content::FileDescriptorInfo(
172 kAndroidPakDescriptor, 175 kAndroidPakDescriptor,
173 base::FileDescriptor(base::File(pak_file, flags)))); 176 base::FileDescriptor(base::File(pak_file, flags))));
174 #endif // defined(OS_ANDROID) 177 #endif // defined(OS_ANDROID)
175 } 178 }
176 179
177 } // namespace shell 180 } // namespace shell
178 } // namespace chromecast 181 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698