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

Side by Side Diff: net/test/spawned_test_server/local_test_server_win.cc

Issue 112963005: Update uses of UTF conversions in courgette/, device/, extensions/, google_apis/, gpu/, ipc/, media… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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/test/python_utils.cc ('k') | net/tools/get_server_time/get_server_time.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) 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 "net/test/spawned_test_server/local_test_server.h" 5 #include "net/test/spawned_test_server/local_test_server.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <wincrypt.h> 8 #include <wincrypt.h>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 ScopedPath::ScopedPath(const base::FilePath& path_to_add) 116 ScopedPath::ScopedPath(const base::FilePath& path_to_add)
117 : environment_(base::Environment::Create()), 117 : environment_(base::Environment::Create()),
118 path_modified_(false) { 118 path_modified_(false) {
119 environment_->GetVar("PATH", &old_path_); 119 environment_->GetVar("PATH", &old_path_);
120 120
121 std::string new_value = old_path_; 121 std::string new_value = old_path_;
122 if (!new_value.empty()) 122 if (!new_value.empty())
123 new_value += ";"; 123 new_value += ";";
124 124
125 new_value += WideToUTF8(path_to_add.value()); 125 new_value += base::WideToUTF8(path_to_add.value());
126 126
127 path_modified_ = environment_->SetVar("PATH", new_value); 127 path_modified_ = environment_->SetVar("PATH", new_value);
128 } 128 }
129 129
130 ScopedPath::~ScopedPath() { 130 ScopedPath::~ScopedPath() {
131 if (!path_modified_) 131 if (!path_modified_)
132 return; 132 return;
133 if (old_path_.empty()) 133 if (old_path_.empty())
134 environment_->UnSetVar("PATH"); 134 environment_->UnSetVar("PATH");
135 else 135 else
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 if (!ParseServerData(server_data)) { 222 if (!ParseServerData(server_data)) {
223 LOG(ERROR) << "Could not parse server_data: " << server_data; 223 LOG(ERROR) << "Could not parse server_data: " << server_data;
224 return false; 224 return false;
225 } 225 }
226 226
227 return true; 227 return true;
228 } 228 }
229 229
230 } // namespace net 230 } // namespace net
231 231
OLDNEW
« no previous file with comments | « net/test/python_utils.cc ('k') | net/tools/get_server_time/get_server_time.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698