| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 return true; | 118 return true; |
| 119 if (url.ProtocolIsInHTTPFamily()) | 119 if (url.ProtocolIsInHTTPFamily()) |
| 120 return true; | 120 return true; |
| 121 #if OS(ANDROID) | 121 #if OS(ANDROID) |
| 122 if (url.ProtocolIs("content")) | 122 if (url.ProtocolIs("content")) |
| 123 return true; | 123 return true; |
| 124 #endif | 124 #endif |
| 125 return false; | 125 return false; |
| 126 } | 126 } |
| 127 | 127 |
| 128 void MHTMLArchive::GenerateMHTMLHeader(const String& boundary, | 128 void MHTMLArchive::GenerateMHTMLHeaderForTesting(const String& boundary, |
| 129 const String& title, | 129 const String& title, |
| 130 const String& mime_type, | 130 const String& mime_type, |
| 131 Vector<char>& output_buffer) { | 131 Vector<char>& output_buffer) { |
| 132 ASSERT(!boundary.IsEmpty()); | 132 ASSERT(!boundary.IsEmpty()); |
| 133 ASSERT(!mime_type.IsEmpty()); | 133 ASSERT(!mime_type.IsEmpty()); |
| 134 | 134 |
| 135 DateComponents now; | 135 DateComponents now; |
| 136 now.SetMillisecondsSinceEpochForDateTime(CurrentTimeMS()); | 136 now.SetMillisecondsSinceEpochForDateTime(CurrentTimeMS()); |
| 137 // TODO(lukasza): Passing individual date/time components seems fragile. | 137 // TODO(lukasza): Passing individual date/time components seems fragile. |
| 138 String date_string = MakeRFC2822DateString( | 138 String date_string = MakeRFC2822DateString( |
| 139 now.WeekDay(), now.MonthDay(), now.Month(), now.FullYear(), now.Hour(), | 139 now.WeekDay(), now.MonthDay(), now.Month(), now.FullYear(), now.Hour(), |
| 140 now.Minute(), now.Second(), 0); | 140 now.Minute(), now.Second(), 0); |
| 141 | 141 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 ArchiveResource* MHTMLArchive::SubresourceForURL(const KURL& url) const { | 269 ArchiveResource* MHTMLArchive::SubresourceForURL(const KURL& url) const { |
| 270 return subresources_.at(url.GetString()); | 270 return subresources_.at(url.GetString()); |
| 271 } | 271 } |
| 272 | 272 |
| 273 DEFINE_TRACE(MHTMLArchive) { | 273 DEFINE_TRACE(MHTMLArchive) { |
| 274 visitor->Trace(main_resource_); | 274 visitor->Trace(main_resource_); |
| 275 visitor->Trace(subresources_); | 275 visitor->Trace(subresources_); |
| 276 } | 276 } |
| 277 | 277 |
| 278 } // namespace blink | 278 } // namespace blink |
| OLD | NEW |