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

Side by Side Diff: chrome/browser/extensions/isolated_app_browsertest.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 26 matching lines...) Expand all
37 37
38 namespace extensions { 38 namespace extensions {
39 39
40 namespace { 40 namespace {
41 41
42 std::string WrapForJavascriptAndExtract(const char* javascript_expression) { 42 std::string WrapForJavascriptAndExtract(const char* javascript_expression) {
43 return std::string("window.domAutomationController.send(") + 43 return std::string("window.domAutomationController.send(") +
44 javascript_expression + ")"; 44 javascript_expression + ")";
45 } 45 }
46 46
47 scoped_ptr<net::test_server::HttpResponse> HandleExpectAndSetCookieRequest( 47 std::unique_ptr<net::test_server::HttpResponse> HandleExpectAndSetCookieRequest(
48 const net::EmbeddedTestServer* test_server, 48 const net::EmbeddedTestServer* test_server,
49 const net::test_server::HttpRequest& request) { 49 const net::test_server::HttpRequest& request) {
50 if (!base::StartsWith(request.relative_url, "/expect-and-set-cookie?", 50 if (!base::StartsWith(request.relative_url, "/expect-and-set-cookie?",
51 base::CompareCase::SENSITIVE)) 51 base::CompareCase::SENSITIVE))
52 return scoped_ptr<net::test_server::HttpResponse>(); 52 return std::unique_ptr<net::test_server::HttpResponse>();
53 53
54 scoped_ptr<net::test_server::BasicHttpResponse> http_response( 54 std::unique_ptr<net::test_server::BasicHttpResponse> http_response(
55 new net::test_server::BasicHttpResponse); 55 new net::test_server::BasicHttpResponse);
56 http_response->set_code(net::HTTP_OK); 56 http_response->set_code(net::HTTP_OK);
57 57
58 std::string request_cookies; 58 std::string request_cookies;
59 auto it = request.headers.find("Cookie"); 59 auto it = request.headers.find("Cookie");
60 if (it != request.headers.end()) 60 if (it != request.headers.end())
61 request_cookies = it->second; 61 request_cookies = it->second;
62 62
63 size_t query_string_pos = request.relative_url.find('?'); 63 size_t query_string_pos = request.relative_url.find('?');
64 std::string query_string = 64 std::string query_string =
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 browser(), base_url.Resolve("non_app/main.html")); 556 browser(), base_url.Resolve("non_app/main.html"));
557 ASSERT_TRUE(ExecuteScriptAndExtractString( 557 ASSERT_TRUE(ExecuteScriptAndExtractString(
558 browser()->tab_strip_model()->GetWebContentsAt(0), 558 browser()->tab_strip_model()->GetWebContentsAt(0),
559 kRetrieveSessionStorage.c_str(), &result)); 559 kRetrieveSessionStorage.c_str(), &result));
560 EXPECT_EQ("ss_normal", result); 560 EXPECT_EQ("ss_normal", result);
561 } 561 }
562 562
563 } // namespace 563 } // namespace
564 564
565 } // namespace extensions 565 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698