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

Side by Side Diff: webkit/plugins/ppapi/ppb_url_request_info_impl.cc

Issue 7621054: Don't use a scoped_refptr for StringVar::FromPPVar (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
« no previous file with comments | « webkit/plugins/ppapi/ppb_uma_private_impl.cc ('k') | webkit/plugins/ppapi/ppb_url_util_impl.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 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h" 5 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "googleurl/src/url_util.h" 10 #include "googleurl/src/url_util.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 break; 213 break;
214 case PP_VARTYPE_BOOL: 214 case PP_VARTYPE_BOOL:
215 result = PP_FromBool( 215 result = PP_FromBool(
216 SetBooleanProperty(property, PP_ToBool(var.value.as_bool))); 216 SetBooleanProperty(property, PP_ToBool(var.value.as_bool)));
217 break; 217 break;
218 case PP_VARTYPE_INT32: 218 case PP_VARTYPE_INT32:
219 result = PP_FromBool( 219 result = PP_FromBool(
220 SetIntegerProperty(property, var.value.as_int)); 220 SetIntegerProperty(property, var.value.as_int));
221 break; 221 break;
222 case PP_VARTYPE_STRING: { 222 case PP_VARTYPE_STRING: {
223 scoped_refptr<StringVar> string(StringVar::FromPPVar(var)); 223 StringVar* string = StringVar::FromPPVar(var);
224 if (string) 224 if (string)
225 result = PP_FromBool(SetStringProperty(property, string->value())); 225 result = PP_FromBool(SetStringProperty(property, string->value()));
226 break; 226 break;
227 } 227 }
228 default: 228 default:
229 break; 229 break;
230 } 230 }
231 return result; 231 return result;
232 } 232 }
233 233
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 has_custom_content_transfer_encoding_ = true; 426 has_custom_content_transfer_encoding_ = true;
427 custom_content_transfer_encoding_ = value; 427 custom_content_transfer_encoding_ = value;
428 return true; 428 return true;
429 default: 429 default:
430 return false; 430 return false;
431 } 431 }
432 } 432 }
433 433
434 } // namespace ppapi 434 } // namespace ppapi
435 } // namespace webkit 435 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_uma_private_impl.cc ('k') | webkit/plugins/ppapi/ppb_url_util_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698