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

Side by Side Diff: webkit/appcache/view_appcache_internals_job.cc

Issue 10824033: Coverity: Fix several pass-by-values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win build fix. Created 8 years, 5 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 | « skia/ext/skia_sandbox_support_win.h ('k') | no next file » | 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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 7
8 #include "webkit/appcache/view_appcache_internals_job.h" 8 #include "webkit/appcache/view_appcache_internals_job.h"
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 std::string* out) { 269 std::string* out) {
270 out->append("<hr><pre>"); 270 out->append("<hr><pre>");
271 base::StringAppendF(out, "Showing %d of %d bytes\n\n", 271 base::StringAppendF(out, "Showing %d of %d bytes\n\n",
272 static_cast<int>(buf_len), static_cast<int>(total_len)); 272 static_cast<int>(buf_len), static_cast<int>(total_len));
273 net::ViewCacheHelper::HexDump(buf, buf_len, out); 273 net::ViewCacheHelper::HexDump(buf, buf_len, out);
274 if (buf_len < total_len) 274 if (buf_len < total_len)
275 out->append("\nNote: data is truncated..."); 275 out->append("\nNote: data is truncated...");
276 out->append("</pre>"); 276 out->append("</pre>");
277 } 277 }
278 278
279 GURL DecodeBase64URL(const std::string base64) { 279 GURL DecodeBase64URL(const std::string& base64) {
280 std::string url; 280 std::string url;
281 base::Base64Decode(base64, &url); 281 base::Base64Decode(base64, &url);
282 return GURL(url); 282 return GURL(url);
283 } 283 }
284 284
285 bool ParseQuery(const std::string& query, 285 bool ParseQuery(const std::string& query,
286 std::string* command, std::string* value) { 286 std::string* command, std::string* value) {
287 size_t position = query.find("="); 287 size_t position = query.find("=");
288 if (position == std::string::npos) 288 if (position == std::string::npos)
289 return false; 289 return false;
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 return new ViewEntryJob(request, service, 624 return new ViewEntryJob(request, service,
625 DecodeBase64URL(tokens[0]), // manifest url 625 DecodeBase64URL(tokens[0]), // manifest url
626 DecodeBase64URL(tokens[1]), // entry url 626 DecodeBase64URL(tokens[1]), // entry url
627 response_id, group_id); 627 response_id, group_id);
628 } 628 }
629 629
630 return new RedirectToMainPageJob(request, service); 630 return new RedirectToMainPageJob(request, service);
631 } 631 }
632 632
633 } // namespace appcache 633 } // namespace appcache
OLDNEW
« no previous file with comments | « skia/ext/skia_sandbox_support_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698