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

Side by Side Diff: chrome/browser/chromeos/app_mode/fake_cws.cc

Issue 640353003: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/chromeos/app_mode/fake_cws.h" 5 #include "chrome/browser/chromeos/app_mode/fake_cws.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 scoped_ptr<HttpResponse> FakeCWS::HandleRequest(const HttpRequest& request) { 132 scoped_ptr<HttpResponse> FakeCWS::HandleRequest(const HttpRequest& request) {
133 GURL request_url = GURL("http://localhost").Resolve(request.relative_url); 133 GURL request_url = GURL("http://localhost").Resolve(request.relative_url);
134 std::string request_path = request_url.path(); 134 std::string request_path = request_url.path();
135 if (!update_check_content_.empty() && 135 if (!update_check_content_.empty() &&
136 request_path.find("/update_check.xml") != std::string::npos) { 136 request_path.find("/update_check.xml") != std::string::npos) {
137 scoped_ptr<BasicHttpResponse> http_response(new BasicHttpResponse()); 137 scoped_ptr<BasicHttpResponse> http_response(new BasicHttpResponse());
138 http_response->set_code(net::HTTP_OK); 138 http_response->set_code(net::HTTP_OK);
139 http_response->set_content_type("text/xml"); 139 http_response->set_content_type("text/xml");
140 http_response->set_content(update_check_content_); 140 http_response->set_content(update_check_content_);
141 return http_response.PassAs<HttpResponse>(); 141 return http_response.Pass();
142 } 142 }
143 143
144 return scoped_ptr<HttpResponse>(); 144 return scoped_ptr<HttpResponse>();
145 } 145 }
146 146
147 } // namespace chromeos 147 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/apps/web_view_browsertest.cc ('k') | chrome/browser/chromeos/login/saml/saml_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698