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

Side by Side Diff: net/proxy/proxy_resolver_v8_tracing_unittest.cc

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
« no previous file with comments | « net/proxy/proxy_resolver_perftest.cc ('k') | net/proxy/proxy_resolver_v8_unittest.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "net/proxy/proxy_resolver_v8_tracing.h" 5 #include "net/proxy/proxy_resolver_v8_tracing.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 scoped_refptr<ProxyResolverScriptData> LoadScriptData(const char* filename) { 42 scoped_refptr<ProxyResolverScriptData> LoadScriptData(const char* filename) {
43 base::FilePath path; 43 base::FilePath path;
44 PathService::Get(base::DIR_SOURCE_ROOT, &path); 44 PathService::Get(base::DIR_SOURCE_ROOT, &path);
45 path = path.AppendASCII("net"); 45 path = path.AppendASCII("net");
46 path = path.AppendASCII("data"); 46 path = path.AppendASCII("data");
47 path = path.AppendASCII("proxy_resolver_v8_tracing_unittest"); 47 path = path.AppendASCII("proxy_resolver_v8_tracing_unittest");
48 path = path.AppendASCII(filename); 48 path = path.AppendASCII(filename);
49 49
50 // Try to read the file from disk. 50 // Try to read the file from disk.
51 std::string file_contents; 51 std::string file_contents;
52 bool ok = file_util::ReadFileToString(path, &file_contents); 52 bool ok = base::ReadFileToString(path, &file_contents);
53 53
54 // If we can't load the file from disk, something is misconfigured. 54 // If we can't load the file from disk, something is misconfigured.
55 EXPECT_TRUE(ok) << "Failed to read file: " << path.value(); 55 EXPECT_TRUE(ok) << "Failed to read file: " << path.value();
56 56
57 // Load the PAC script into the ProxyResolver. 57 // Load the PAC script into the ProxyResolver.
58 return ProxyResolverScriptData::FromUTF8(file_contents); 58 return ProxyResolverScriptData::FromUTF8(file_contents);
59 } 59 }
60 60
61 void InitResolver(ProxyResolverV8Tracing* resolver, const char* filename) { 61 void InitResolver(ProxyResolverV8Tracing* resolver, const char* filename) {
62 TestCompletionCallback callback; 62 TestCompletionCallback callback;
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 proxy_uri.substr(0, proxy_uri.find(':') + 1)); 1090 proxy_uri.substr(0, proxy_uri.find(':') + 1));
1091 } else { 1091 } else {
1092 NOTREACHED(); 1092 NOTREACHED();
1093 } 1093 }
1094 } 1094 }
1095 } 1095 }
1096 1096
1097 } // namespace 1097 } // namespace
1098 1098
1099 } // namespace net 1099 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_perftest.cc ('k') | net/proxy/proxy_resolver_v8_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698