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

Side by Side Diff: mojo/shell/network_fetcher.cc

Issue 1282363003: Convert remaining StringToLowerASCII to ToLowerASCII (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « mojo/services/network/http_server_apptest.cc ('k') | net/base/data_url.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mojo/shell/network_fetcher.h" 5 #include "mojo/shell/network_fetcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 if (!file.IsValid()) { 124 if (!file.IsValid()) {
125 LOG(ERROR) << "Error reading " << path.value(); 125 LOG(ERROR) << "Error reading " << path.value();
126 return false; 126 return false;
127 } 127 }
128 // The output is really a vector of unit8, we're cheating by using a string. 128 // The output is really a vector of unit8, we're cheating by using a string.
129 std::string output(crypto::kSHA256Length, 0); 129 std::string output(crypto::kSHA256Length, 0);
130 ctx->Finish(string_as_array(&output), output.size()); 130 ctx->Finish(string_as_array(&output), output.size());
131 output = base::HexEncode(output.c_str(), output.size()); 131 output = base::HexEncode(output.c_str(), output.size());
132 // Using lowercase for compatiblity with sha256sum output. 132 // Using lowercase for compatiblity with sha256sum output.
133 *digest_string = base::StringToLowerASCII(output); 133 *digest_string = base::ToLowerASCII(output);
134 return true; 134 return true;
135 } 135 }
136 136
137 bool NetworkFetcher::RenameToAppId(const GURL& url, 137 bool NetworkFetcher::RenameToAppId(const GURL& url,
138 const base::FilePath& old_path, 138 const base::FilePath& old_path,
139 base::FilePath* new_path) { 139 base::FilePath* new_path) {
140 std::string app_id; 140 std::string app_id;
141 if (!ComputeAppId(old_path, &app_id)) 141 if (!ComputeAppId(old_path, &app_id))
142 return false; 142 return false;
143 143
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 loader_callback_.Run(nullptr); 249 loader_callback_.Run(nullptr);
250 return; 250 return;
251 } 251 }
252 252
253 response_ = response.Pass(); 253 response_ = response.Pass();
254 loader_callback_.Run(owner.Pass()); 254 loader_callback_.Run(owner.Pass());
255 } 255 }
256 256
257 } // namespace shell 257 } // namespace shell
258 } // namespace mojo 258 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/network/http_server_apptest.cc ('k') | net/base/data_url.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698