OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/web/public/url_schemes.h" | 5 #include "ios/web/public/url_schemes.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ios/web/public/web_client.h" | 10 #import "ios/web/public/web_client.h" |
11 #include "url/url_util.h" | 11 #include "url/url_util.h" |
12 | 12 |
13 #if !defined(__has_feature) || !__has_feature(objc_arc) | 13 #if !defined(__has_feature) || !__has_feature(objc_arc) |
14 #error "This file requires ARC support." | 14 #error "This file requires ARC support." |
15 #endif | 15 #endif |
16 | 16 |
17 namespace web { | 17 namespace web { |
18 | 18 |
19 namespace { | 19 namespace { |
20 void AddStandardSchemeHelper(const url::SchemeWithType& scheme) { | 20 void AddStandardSchemeHelper(const url::SchemeWithType& scheme) { |
(...skipping 10 matching lines...) Expand all Loading... |
31 // Prevent future modification of the schemes lists. This is to prevent | 31 // Prevent future modification of the schemes lists. This is to prevent |
32 // accidental creation of data races in the program. Add*Scheme aren't | 32 // accidental creation of data races in the program. Add*Scheme aren't |
33 // threadsafe so must be called when GURL isn't used on any other thread. This | 33 // threadsafe so must be called when GURL isn't used on any other thread. This |
34 // is really easy to mess up, so we say that all calls to Add*Scheme in Chrome | 34 // is really easy to mess up, so we say that all calls to Add*Scheme in Chrome |
35 // must be inside this function. | 35 // must be inside this function. |
36 if (lock_schemes) | 36 if (lock_schemes) |
37 url::LockSchemeRegistries(); | 37 url::LockSchemeRegistries(); |
38 } | 38 } |
39 | 39 |
40 } // namespace web | 40 } // namespace web |
OLD | NEW |