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

Side by Side Diff: chrome/browser/crash_recovery_browsertest.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 (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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_commands.h" 9 #include "chrome/browser/ui/browser_commands.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 if (request.relative_url != path_) 53 if (request.relative_url != path_)
54 return scoped_ptr<net::test_server::HttpResponse>(); 54 return scoped_ptr<net::test_server::HttpResponse>();
55 55
56 request_count_++; 56 request_count_++;
57 scoped_ptr<net::test_server::BasicHttpResponse> response( 57 scoped_ptr<net::test_server::BasicHttpResponse> response(
58 new net::test_server::BasicHttpResponse); 58 new net::test_server::BasicHttpResponse);
59 response->set_content(base::StringPrintf("<title>%d</title>", 59 response->set_content(base::StringPrintf("<title>%d</title>",
60 request_count_)); 60 request_count_));
61 response->set_content_type("text/html"); 61 response->set_content_type("text/html");
62 response->AddCustomHeader("Cache-Control", "max-age=99999"); 62 response->AddCustomHeader("Cache-Control", "max-age=99999");
63 return response.PassAs<net::test_server::HttpResponse>(); 63 return response.Pass();
64 } 64 }
65 private: 65 private:
66 std::string path_; 66 std::string path_;
67 int request_count_; 67 int request_count_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(CacheMaxAgeHandler); 69 DISALLOW_COPY_AND_ASSIGN(CacheMaxAgeHandler);
70 }; 70 };
71 71
72 class CrashRecoveryBrowserTest : public InProcessBrowserTest { 72 class CrashRecoveryBrowserTest : public InProcessBrowserTest {
73 protected: 73 protected:
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 ASSERT_EQ(url, GetActiveWebContents()->GetVisibleURL()); 168 ASSERT_EQ(url, GetActiveWebContents()->GetVisibleURL());
169 169
170 chrome::Reload(browser(), CURRENT_TAB); 170 chrome::Reload(browser(), CURRENT_TAB);
171 content::WaitForLoadStop(GetActiveWebContents()); 171 content::WaitForLoadStop(GetActiveWebContents());
172 ASSERT_EQ(url, GetActiveWebContents()->GetVisibleURL()); 172 ASSERT_EQ(url, GetActiveWebContents()->GetVisibleURL());
173 } 173 }
174 174
175 } // namespace 175 } // namespace
176 176
177 #endif 177 #endif
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/power/power_prefs_unittest.cc ('k') | chrome/browser/devtools/browser_list_tabcontents_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698