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

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

Issue 7720022: Third-party appcache blocking. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Keeping up to date with trunk. Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 const AppCacheInfo* info, 105 const AppCacheInfo* info,
106 std::string* out) { 106 std::string* out) {
107 std::string manifest_url_base64; 107 std::string manifest_url_base64;
108 base::Base64Encode(info->manifest_url.spec(), &manifest_url_base64); 108 base::Base64Encode(info->manifest_url.spec(), &manifest_url_base64);
109 109
110 out->append("\n<p>"); 110 out->append("\n<p>");
111 out->append(kManifest); 111 out->append(kManifest);
112 EmitAnchor(info->manifest_url.spec(), info->manifest_url.spec(), out); 112 EmitAnchor(info->manifest_url.spec(), info->manifest_url.spec(), out);
113 out->append("<br/>\n"); 113 out->append("<br/>\n");
114 if (!service->appcache_policy()->CanLoadAppCache( 114 if (!service->appcache_policy()->CanLoadAppCache(
115 info->manifest_url)) { 115 info->manifest_url, info->manifest_url)) {
116 out->append(kFormattedDisabledAppCacheMsg); 116 out->append(kFormattedDisabledAppCacheMsg);
117 } 117 }
118 out->append("\n<br/>\n"); 118 out->append("\n<br/>\n");
119 EmitCommandAnchor(kRemoveCacheLabel, base_url, 119 EmitCommandAnchor(kRemoveCacheLabel, base_url,
120 kRemoveCacheCommand, manifest_url_base64.c_str(), out); 120 kRemoveCacheCommand, manifest_url_base64.c_str(), out);
121 out->append("&nbsp;&nbsp;"); 121 out->append("&nbsp;&nbsp;");
122 EmitCommandAnchor(kViewCacheLabel, base_url, 122 EmitCommandAnchor(kViewCacheLabel, base_url,
123 kViewCacheCommand, manifest_url_base64.c_str(), out); 123 kViewCacheCommand, manifest_url_base64.c_str(), out);
124 out->append("\n<br/>\n"); 124 out->append("\n<br/>\n");
125 out->append("<ul>"); 125 out->append("<ul>");
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 return new ViewEntryJob(request, service, 609 return new ViewEntryJob(request, service,
610 DecodeBase64URL(tokens[0]), // manifest url 610 DecodeBase64URL(tokens[0]), // manifest url
611 DecodeBase64URL(tokens[1]), // entry url 611 DecodeBase64URL(tokens[1]), // entry url
612 response_id); 612 response_id);
613 } 613 }
614 614
615 return new RedirectToMainPageJob(request, service); 615 return new RedirectToMainPageJob(request, service);
616 } 616 }
617 617
618 } // namespace appcache 618 } // namespace appcache
OLDNEW
« no previous file with comments | « webkit/appcache/mock_appcache_storage_unittest.cc ('k') | webkit/tools/test_shell/test_shell.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698