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

Side by Side Diff: ppapi/shared_impl/ppb_url_util_shared.h

Issue 174213003: PPAPI: Use clang-format on ppapi/shared_impl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove DEPS Created 6 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
« no previous file with comments | « ppapi/shared_impl/ppb_trace_event_impl.cc ('k') | ppapi/shared_impl/ppb_var_shared.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 PPAPI_SHARED_IMPL_PPB_URL_UTIL_SHARED_H_ 5 #ifndef PPAPI_SHARED_IMPL_PPB_URL_UTIL_SHARED_H_
6 #define PPAPI_SHARED_IMPL_PPB_URL_UTIL_SHARED_H_ 6 #define PPAPI_SHARED_IMPL_PPB_URL_UTIL_SHARED_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "ppapi/c/dev/ppb_url_util_dev.h" 11 #include "ppapi/c/dev/ppb_url_util_dev.h"
12 #include "ppapi/c/pp_var.h" 12 #include "ppapi/c/pp_var.h"
13 #include "ppapi/shared_impl/ppapi_shared_export.h" 13 #include "ppapi/shared_impl/ppapi_shared_export.h"
14 #include "url/url_parse.h" 14 #include "url/url_parse.h"
15 15
16 class GURL; 16 class GURL;
17 17
18 namespace ppapi { 18 namespace ppapi {
19 19
20 // Contains the implementation of PPB_URLUtil that is shared between the proxy 20 // Contains the implementation of PPB_URLUtil that is shared between the proxy
21 // and the renderer. 21 // and the renderer.
22 class PPAPI_SHARED_EXPORT PPB_URLUtil_Shared { 22 class PPAPI_SHARED_EXPORT PPB_URLUtil_Shared {
23 public: 23 public:
24 // PPB_URLUtil shared functions. 24 // PPB_URLUtil shared functions.
25 static PP_Var Canonicalize(PP_Var url, 25 static PP_Var Canonicalize(PP_Var url, PP_URLComponents_Dev* components);
26 PP_URLComponents_Dev* components);
27 static PP_Var ResolveRelativeToURL(PP_Var base_url, 26 static PP_Var ResolveRelativeToURL(PP_Var base_url,
28 PP_Var relative, 27 PP_Var relative,
29 PP_URLComponents_Dev* components); 28 PP_URLComponents_Dev* components);
30 static PP_Bool IsSameSecurityOrigin(PP_Var url_a, PP_Var url_b); 29 static PP_Bool IsSameSecurityOrigin(PP_Var url_a, PP_Var url_b);
31 30
32 // Used for returning the given GURL from a PPAPI function, with an optional 31 // Used for returning the given GURL from a PPAPI function, with an optional
33 // out param indicating the components. 32 // out param indicating the components.
34 static PP_Var GenerateURLReturn(const GURL& url, 33 static PP_Var GenerateURLReturn(const GURL& url,
35 PP_URLComponents_Dev* components); 34 PP_URLComponents_Dev* components);
36 35
37 // Helper function that optionally take a components structure and fills it 36 // Helper function that optionally take a components structure and fills it
38 // out with the parsed version of the given URL. If the components pointer is 37 // out with the parsed version of the given URL. If the components pointer is
39 // NULL, this function will do nothing. 38 // NULL, this function will do nothing.
40 // 39 //
41 // It's annoying to serialze the large PP_URLComponents structure across IPC 40 // It's annoying to serialze the large PP_URLComponents structure across IPC
42 // and the data isn't often requested by plugins. This function is used on 41 // and the data isn't often requested by plugins. This function is used on
43 // the plugin side to fill in the components for those cases where it's 42 // the plugin side to fill in the components for those cases where it's
44 // actually needed. 43 // actually needed.
45 static PP_Var ConvertComponentsAndReturnURL(const PP_Var& url, 44 static PP_Var ConvertComponentsAndReturnURL(const PP_Var& url,
46 PP_URLComponents_Dev* components); 45 PP_URLComponents_Dev* components);
47 }; 46 };
48 47
49 } // namespace ppapi 48 } // namespace ppapi
50 49
51 #endif // PPAPI_SHARED_IMPL_PPB_URL_UTIL_SHARED_H_ 50 #endif // PPAPI_SHARED_IMPL_PPB_URL_UTIL_SHARED_H_
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppb_trace_event_impl.cc ('k') | ppapi/shared_impl/ppb_var_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698