| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 bool frameShouldBeSerializedAsMHTML( | 312 bool frameShouldBeSerializedAsMHTML( |
| 313 WebLocalFrame* frame, | 313 WebLocalFrame* frame, |
| 314 WebFrameSerializerCacheControlPolicy cacheControlPolicy) { | 314 WebFrameSerializerCacheControlPolicy cacheControlPolicy) { |
| 315 WebLocalFrameImpl* webLocalFrameImpl = toWebLocalFrameImpl(frame); | 315 WebLocalFrameImpl* webLocalFrameImpl = toWebLocalFrameImpl(frame); |
| 316 DCHECK(webLocalFrameImpl); | 316 DCHECK(webLocalFrameImpl); |
| 317 | 317 |
| 318 if (cacheControlPolicy == WebFrameSerializerCacheControlPolicy::None) | 318 if (cacheControlPolicy == WebFrameSerializerCacheControlPolicy::None) |
| 319 return true; | 319 return true; |
| 320 | 320 |
| 321 bool needToCheckNoStore = | 321 bool needToCheckNoStore = |
| 322 cacheControlPolicy == WebFrameSerializerCacheControlPolicy:: | 322 cacheControlPolicy == |
| 323 SkipAnyFrameOrResourceMarkedNoStore || | 323 WebFrameSerializerCacheControlPolicy:: |
| 324 SkipAnyFrameOrResourceMarkedNoStore || |
| 324 (!frame->parent() && | 325 (!frame->parent() && |
| 325 cacheControlPolicy == | 326 cacheControlPolicy == |
| 326 WebFrameSerializerCacheControlPolicy::FailForNoStoreMainFrame); | 327 WebFrameSerializerCacheControlPolicy::FailForNoStoreMainFrame); |
| 327 | 328 |
| 328 if (!needToCheckNoStore) | 329 if (!needToCheckNoStore) |
| 329 return true; | 330 return true; |
| 330 | 331 |
| 331 return !cacheControlNoStoreHeaderPresent(*webLocalFrameImpl); | 332 return !cacheControlNoStoreHeaderPresent(*webLocalFrameImpl); |
| 332 } | 333 } |
| 333 | 334 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 const WebString& baseTarget) { | 456 const WebString& baseTarget) { |
| 456 // TODO(yosin) We should call |FrameSerializer::baseTagDeclarationOf()|. | 457 // TODO(yosin) We should call |FrameSerializer::baseTagDeclarationOf()|. |
| 457 if (baseTarget.isEmpty()) | 458 if (baseTarget.isEmpty()) |
| 458 return String("<base href=\".\">"); | 459 return String("<base href=\".\">"); |
| 459 String baseString = "<base href=\".\" target=\"" + | 460 String baseString = "<base href=\".\" target=\"" + |
| 460 static_cast<const String&>(baseTarget) + "\">"; | 461 static_cast<const String&>(baseTarget) + "\">"; |
| 461 return baseString; | 462 return baseString; |
| 462 } | 463 } |
| 463 | 464 |
| 464 } // namespace blink | 465 } // namespace blink |
| OLD | NEW |