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

Side by Side Diff: ppapi/shared_impl/url_util_impl.cc

Issue 8316008: Add a new globals object for PPAPI tracking information. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
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 #include "ppapi/shared_impl/url_util_impl.h" 5 #include "ppapi/shared_impl/url_util_impl.h"
6 6
7 #include "googleurl/src/gurl.h" 7 #include "googleurl/src/gurl.h"
8 #include "ppapi/shared_impl/ppapi_globals.h"
8 #include "ppapi/shared_impl/tracker_base.h" 9 #include "ppapi/shared_impl/tracker_base.h"
9 #include "ppapi/shared_impl/var.h" 10 #include "ppapi/shared_impl/var.h"
10 #include "ppapi/shared_impl/var_tracker.h" 11 #include "ppapi/shared_impl/var_tracker.h"
11 12
12 namespace ppapi { 13 namespace ppapi {
13 14
14 namespace { 15 namespace {
15 16
16 void ConvertComponent(const url_parse::Component& input, 17 void ConvertComponent(const url_parse::Component& input,
17 PP_URLComponent_Dev* output) { 18 PP_URLComponent_Dev* output) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 const PP_Var& url, 100 const PP_Var& url,
100 PP_URLComponents_Dev* components) { 101 PP_URLComponents_Dev* components) {
101 if (!components) 102 if (!components)
102 return url; // Common case - plugin doesn't care about parsing. 103 return url; // Common case - plugin doesn't care about parsing.
103 104
104 StringVar* url_string = StringVar::FromPPVar(url); 105 StringVar* url_string = StringVar::FromPPVar(url);
105 if (!url_string) 106 if (!url_string)
106 return url; 107 return url;
107 108
108 PP_Var result = Canonicalize(url, components); 109 PP_Var result = Canonicalize(url, components);
109 TrackerBase::Get()->GetVarTracker()->ReleaseVar(url); 110 PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(url);
110 return result; 111 return result;
111 } 112 }
112 113
113 } // namespace ppapi 114 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698