OLD | NEW |
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 Loading... |
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(" "); | 121 out->append(" "); |
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 Loading... |
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 |
OLD | NEW |