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

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

Issue 12767006: [Cleanup] Remove StringPrintf from global namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, once more Created 7 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 | Annotate | Revision Log
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.h" 8 #include "base/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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 67 }
68 68
69 class MockErrorObserver : public ProxyResolverErrorObserver { 69 class MockErrorObserver : public ProxyResolverErrorObserver {
70 public: 70 public:
71 MockErrorObserver() : event_(true, false) {} 71 MockErrorObserver() : event_(true, false) {}
72 72
73 virtual void OnPACScriptError(int line_number, 73 virtual void OnPACScriptError(int line_number,
74 const string16& error) OVERRIDE { 74 const string16& error) OVERRIDE {
75 { 75 {
76 base::AutoLock l(lock_); 76 base::AutoLock l(lock_);
77 output += StringPrintf("Error: line %d: %s\n", line_number, 77 output += base::StringPrintf("Error: line %d: %s\n", line_number,
78 UTF16ToASCII(error).c_str()); 78 UTF16ToASCII(error).c_str());
79 } 79 }
80 event_.Signal(); 80 event_.Signal();
81 } 81 }
82 82
83 std::string GetOutput() { 83 std::string GetOutput() {
84 base::AutoLock l(lock_); 84 base::AutoLock l(lock_);
85 return output; 85 return output;
86 } 86 }
87 87
88 void WaitForOutput() { 88 void WaitForOutput() {
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 proxy_uri.substr(0, proxy_uri.find(':') + 1)); 1087 proxy_uri.substr(0, proxy_uri.find(':') + 1));
1088 } else { 1088 } else {
1089 NOTREACHED(); 1089 NOTREACHED();
1090 } 1090 }
1091 } 1091 }
1092 } 1092 }
1093 1093
1094 } // namespace 1094 } // namespace
1095 1095
1096 } // namespace net 1096 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698