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

Side by Side Diff: content/shell/browser/shell_layout_tests_android.cc

Issue 185413019: Used scoped_ptr in InitMessagePumpForUIFactory and CreateMessagePumpForType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes in accordance to build fail for linux chromeos Created 6 years, 9 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
« no previous file with comments | « base/test/test_support_ios.mm ('k') | content/test/content_test_launcher.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/shell/browser/shell_layout_tests_android.h" 5 #include "content/shell/browser/shell_layout_tests_android.h"
6 6
7 #include "base/android/fifo_utils.h" 7 #include "base/android/fifo_utils.h"
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 19 matching lines...) Expand all
30 env, base::android::GetApplicationContext()); 30 env, base::android::GetApplicationContext());
31 return base::FilePath(ConvertJavaStringToUTF8(directory)); 31 return base::FilePath(ConvertJavaStringToUTF8(directory));
32 } 32 }
33 33
34 void EnsureCreateFIFO(const base::FilePath& path) { 34 void EnsureCreateFIFO(const base::FilePath& path) {
35 unlink(path.value().c_str()); 35 unlink(path.value().c_str());
36 CHECK(base::android::CreateFIFO(path, 0666)) 36 CHECK(base::android::CreateFIFO(path, 0666))
37 << "Unable to create the Android's FIFO: " << path.value().c_str(); 37 << "Unable to create the Android's FIFO: " << path.value().c_str();
38 } 38 }
39 39
40 base::MessagePump* CreateMessagePumpForUI() { 40 scoped_ptr<base::MessagePump> CreateMessagePumpForUI() {
41 return new content::NestedMessagePumpAndroid(); 41 return scoped_ptr<base::MessagePump>(new content::NestedMessagePumpAndroid());
42 } 42 }
43 43
44 } // namespace 44 } // namespace
45 45
46 namespace content { 46 namespace content {
47 47
48 bool GetTestUrlForAndroid(std::string& path_or_url, GURL* url) { 48 bool GetTestUrlForAndroid(std::string& path_or_url, GURL* url) {
49 if (path_or_url.find(kAndroidLayoutTestPath) == std::string::npos) 49 if (path_or_url.find(kAndroidLayoutTestPath) == std::string::npos)
50 return false; 50 return false;
51 51
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // Redirecting stdout needs to happen before redirecting stdin, which needs 84 // Redirecting stdout needs to happen before redirecting stdin, which needs
85 // to happen before redirecting stderr. 85 // to happen before redirecting stderr.
86 success = base::android::RedirectStream(stdout, stdout_fifo, "w") && 86 success = base::android::RedirectStream(stdout, stdout_fifo, "w") &&
87 base::android::RedirectStream(stdin, stdin_fifo, "r") && 87 base::android::RedirectStream(stdin, stdin_fifo, "r") &&
88 base::android::RedirectStream(stderr, stderr_fifo, "w"); 88 base::android::RedirectStream(stderr, stderr_fifo, "w");
89 89
90 CHECK(success) << "Unable to initialize the Android FIFOs."; 90 CHECK(success) << "Unable to initialize the Android FIFOs.";
91 } 91 }
92 92
93 } // namespace content 93 } // namespace content
OLDNEW
« no previous file with comments | « base/test/test_support_ios.mm ('k') | content/test/content_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698