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

Side by Side Diff: content/common/url_schemes.cc

Issue 1738663002: Hook embedded shell up to MojoShellConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 "content/common/url_schemes.h" 5 #include "content/common/url_schemes.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 15 matching lines...) Expand all
26 std::vector<url::SchemeWithType> additional_standard_schemes; 26 std::vector<url::SchemeWithType> additional_standard_schemes;
27 std::vector<url::SchemeWithType> additional_referrer_schemes; 27 std::vector<url::SchemeWithType> additional_referrer_schemes;
28 std::vector<std::string> additional_savable_schemes; 28 std::vector<std::string> additional_savable_schemes;
29 29
30 GetContentClient()->AddAdditionalSchemes(&additional_standard_schemes, 30 GetContentClient()->AddAdditionalSchemes(&additional_standard_schemes,
31 &additional_referrer_schemes, 31 &additional_referrer_schemes,
32 &additional_savable_schemes); 32 &additional_savable_schemes);
33 33
34 url::AddStandardScheme(kChromeDevToolsScheme, url::SCHEME_WITHOUT_PORT); 34 url::AddStandardScheme(kChromeDevToolsScheme, url::SCHEME_WITHOUT_PORT);
35 url::AddStandardScheme(kChromeUIScheme, url::SCHEME_WITHOUT_PORT); 35 url::AddStandardScheme(kChromeUIScheme, url::SCHEME_WITHOUT_PORT);
36 url::AddStandardScheme(kExeScheme, url::SCHEME_WITHOUT_AUTHORITY);
36 url::AddStandardScheme(kGuestScheme, url::SCHEME_WITHOUT_PORT); 37 url::AddStandardScheme(kGuestScheme, url::SCHEME_WITHOUT_PORT);
37 url::AddStandardScheme(kMetadataScheme, url::SCHEME_WITHOUT_AUTHORITY); 38 url::AddStandardScheme(kMetadataScheme, url::SCHEME_WITHOUT_AUTHORITY);
39 url::AddStandardScheme(kMojoScheme, url::SCHEME_WITHOUT_AUTHORITY);
38 40
39 for (const url::SchemeWithType& scheme : additional_standard_schemes) 41 for (const url::SchemeWithType& scheme : additional_standard_schemes)
40 url::AddStandardScheme(scheme.scheme, scheme.type); 42 url::AddStandardScheme(scheme.scheme, scheme.type);
41 43
42 for (const url::SchemeWithType& scheme : additional_referrer_schemes) 44 for (const url::SchemeWithType& scheme : additional_referrer_schemes)
43 url::AddReferrerScheme(scheme.scheme, scheme.type); 45 url::AddReferrerScheme(scheme.scheme, scheme.type);
44 46
45 // Prevent future modification of the scheme lists. This is to prevent 47 // Prevent future modification of the scheme lists. This is to prevent
46 // accidental creation of data races in the program. Add*Scheme aren't 48 // accidental creation of data races in the program. Add*Scheme aren't
47 // threadsafe so must be called when GURL isn't used on any other thread. This 49 // threadsafe so must be called when GURL isn't used on any other thread. This
(...skipping 21 matching lines...) Expand all
69 savable_schemes[default_schemes_count + i] = 71 savable_schemes[default_schemes_count + i] =
70 base::strdup(additional_savable_schemes[i].c_str()); 72 base::strdup(additional_savable_schemes[i].c_str());
71 } 73 }
72 savable_schemes[default_schemes_count + schemes] = 0; 74 savable_schemes[default_schemes_count + schemes] = 0;
73 75
74 SetSavableSchemes(savable_schemes); 76 SetSavableSchemes(savable_schemes);
75 } 77 }
76 } 78 }
77 79
78 } // namespace content 80 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698