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

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

Issue 2622693002: Cleanup of static lists of schemes & origins that are created at startup. (Closed)
Patch Set: merge Created 3 years, 11 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 | « content/common/savable_url_schemes.cc ('k') | content/common/url_schemes.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CONTENT_COMMON_URL_SCHEMES_H_ 5 #ifndef CONTENT_COMMON_URL_SCHEMES_H_
6 #define CONTENT_COMMON_URL_SCHEMES_H_ 6 #define CONTENT_COMMON_URL_SCHEMES_H_
7 7
8 #include <string>
9 #include <vector>
10
8 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "url/gurl.h"
9 13
10 namespace content { 14 namespace content {
11 15
12 // Note: ContentMainRunner calls this method internally as part of main 16 // Note: ContentMainRunner calls this method internally as part of main
13 // initialization, so this function generally should not be called by 17 // initialization, so this function generally should not be called by
14 // embedders. It's exported to facilitate test harnesses that do not 18 // embedders. It's exported to facilitate test harnesses that do not
15 // utilize ContentMainRunner and that do not wish to lock the set 19 // utilize ContentMainRunner and that do not wish to lock the set
16 // of standard schemes at init time. 20 // of standard schemes at init time.
17 // 21 //
18 // Called near the beginning of startup to register URL schemes that should be 22 // Called near the beginning of startup to register URL schemes that should be
19 // parsed as "standard" or "referrer" with the src/url/ library. Optionally, the 23 // parsed as "standard" or "referrer" with the src/url/ library. Optionally, the
20 // sets of schemes are locked down. The embedder can add additional schemes by 24 // sets of schemes are locked down. The embedder can add additional schemes by
21 // overriding the ContentClient::AddAdditionalSchemes method. 25 // overriding the ContentClient::AddAdditionalSchemes method.
22 CONTENT_EXPORT void RegisterContentSchemes(bool lock_schemes); 26 CONTENT_EXPORT void RegisterContentSchemes(bool lock_schemes);
23 27
28 // See comment in ContentClient::AddAdditionalSchemes for explanations. These
29 // getters can be invoked on any thread.
30 const std::vector<std::string>& GetSavableSchemes();
31 const std::vector<std::string>& GetSecureSchemes();
32 const std::vector<GURL>& GetSecureOrigins();
33 const std::vector<std::string>& GetServiceWorkerSchemes();
34
35 // Resets the internal secure schemes/origins and service worker whitelists.
36 // Used only for testing.
37 void CONTENT_EXPORT RefreshSecuritySchemesForTesting();
38
24 } // namespace content 39 } // namespace content
25 40
26 #endif // CONTENT_COMMON_URL_SCHEMES_H_ 41 #endif // CONTENT_COMMON_URL_SCHEMES_H_
OLDNEW
« no previous file with comments | « content/common/savable_url_schemes.cc ('k') | content/common/url_schemes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698