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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1899803002: Offline Pages: Use 'binary encoding' to create MHTML, instead of base64. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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 "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 2771 matching lines...) Expand 10 before | Expand all | Expand 10 after
2782 key_value, ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 2782 key_value, ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
2783 DCHECK_EQ(2ul, pair.size()); 2783 DCHECK_EQ(2ul, pair.size());
2784 params->add_request_header(pair[0], pair[1]); 2784 params->add_request_header(pair[0], pair[1]);
2785 } 2785 }
2786 } 2786 }
2787 dlm->DownloadUrl(std::move(params)); 2787 dlm->DownloadUrl(std::move(params));
2788 } 2788 }
2789 2789
2790 void WebContentsImpl::GenerateMHTML( 2790 void WebContentsImpl::GenerateMHTML(
2791 const base::FilePath& file, 2791 const base::FilePath& file,
2792 bool use_binary_encoding,
2792 const base::Callback<void(int64_t)>& callback) { 2793 const base::Callback<void(int64_t)>& callback) {
2793 MHTMLGenerationManager::GetInstance()->SaveMHTML(this, file, callback); 2794 MHTMLGenerationManager::GetInstance()->SaveMHTML(this, use_binary_encoding,
2795 file, callback);
2794 } 2796 }
2795 2797
2796 const std::string& WebContentsImpl::GetContentsMimeType() const { 2798 const std::string& WebContentsImpl::GetContentsMimeType() const {
2797 return contents_mime_type_; 2799 return contents_mime_type_;
2798 } 2800 }
2799 2801
2800 bool WebContentsImpl::WillNotifyDisconnection() const { 2802 bool WebContentsImpl::WillNotifyDisconnection() const {
2801 return notify_disconnection_; 2803 return notify_disconnection_;
2802 } 2804 }
2803 2805
(...skipping 2194 matching lines...) Expand 10 before | Expand all | Expand 10 after
4998 for (RenderViewHost* render_view_host : render_view_host_set) 5000 for (RenderViewHost* render_view_host : render_view_host_set)
4999 render_view_host->OnWebkitPreferencesChanged(); 5001 render_view_host->OnWebkitPreferencesChanged();
5000 } 5002 }
5001 5003
5002 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 5004 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
5003 JavaScriptDialogManager* dialog_manager) { 5005 JavaScriptDialogManager* dialog_manager) {
5004 dialog_manager_ = dialog_manager; 5006 dialog_manager_ = dialog_manager;
5005 } 5007 }
5006 5008
5007 } // namespace content 5009 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698