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

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

Issue 9391013: Make a global enum to differentiate impl & proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | 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 "webkit/plugins/ppapi/ppb_url_response_info_impl.h" 5 #include "webkit/plugins/ppapi/ppb_url_response_info_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ppapi/c/pp_var.h" 8 #include "ppapi/c/pp_var.h"
9 #include "ppapi/shared_impl/var.h" 9 #include "ppapi/shared_impl/var.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPHeade rVisitor.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPHeade rVisitor.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 std::string buffer_; 44 std::string buffer_;
45 }; 45 };
46 46
47 bool IsRedirect(int32_t status) { 47 bool IsRedirect(int32_t status) {
48 return status >= 300 && status <= 399; 48 return status >= 300 && status <= 399;
49 } 49 }
50 50
51 } // namespace 51 } // namespace
52 52
53 PPB_URLResponseInfo_Impl::PPB_URLResponseInfo_Impl(PP_Instance instance) 53 PPB_URLResponseInfo_Impl::PPB_URLResponseInfo_Impl(PP_Instance instance)
54 : Resource(instance), 54 : Resource(::ppapi::OBJECT_IS_IMPL, instance),
55 status_code_(-1) { 55 status_code_(-1) {
56 } 56 }
57 57
58 PPB_URLResponseInfo_Impl::~PPB_URLResponseInfo_Impl() { 58 PPB_URLResponseInfo_Impl::~PPB_URLResponseInfo_Impl() {
59 } 59 }
60 60
61 bool PPB_URLResponseInfo_Impl::Initialize(const WebURLResponse& response) { 61 bool PPB_URLResponseInfo_Impl::Initialize(const WebURLResponse& response) {
62 url_ = response.url().spec(); 62 url_ = response.url().spec();
63 status_code_ = response.httpStatusCode(); 63 status_code_ = response.httpStatusCode();
64 status_text_ = response.httpStatusText().utf8(); 64 status_text_ = response.httpStatusText().utf8();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 PP_Resource PPB_URLResponseInfo_Impl::GetBodyAsFileRef() { 109 PP_Resource PPB_URLResponseInfo_Impl::GetBodyAsFileRef() {
110 if (!body_.get()) 110 if (!body_.get())
111 return 0; 111 return 0;
112 return body_->GetReference(); 112 return body_->GetReference();
113 } 113 }
114 114
115 } // namespace ppapi 115 } // namespace ppapi
116 } // namespace webkit 116 } // namespace webkit
117 117
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698