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

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

Issue 1947263004: Introduces a new MHTML generation parameter specifying different behvaior for cache-control headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto origin/master. Created 4 years, 7 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 2783 matching lines...) Expand 10 before | Expand all | Expand 10 after
2794 std::vector<std::string> pair = base::SplitString( 2794 std::vector<std::string> pair = base::SplitString(
2795 key_value, ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 2795 key_value, ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
2796 DCHECK_EQ(2ul, pair.size()); 2796 DCHECK_EQ(2ul, pair.size());
2797 params->add_request_header(pair[0], pair[1]); 2797 params->add_request_header(pair[0], pair[1]);
2798 } 2798 }
2799 } 2799 }
2800 dlm->DownloadUrl(std::move(params)); 2800 dlm->DownloadUrl(std::move(params));
2801 } 2801 }
2802 2802
2803 void WebContentsImpl::GenerateMHTML( 2803 void WebContentsImpl::GenerateMHTML(
2804 const base::FilePath& file, 2804 const MHTMLGenerationParams& params,
2805 bool use_binary_encoding,
2806 const base::Callback<void(int64_t)>& callback) { 2805 const base::Callback<void(int64_t)>& callback) {
2807 MHTMLGenerationManager::GetInstance()->SaveMHTML(this, use_binary_encoding, 2806 MHTMLGenerationManager::GetInstance()->SaveMHTML(this, params, callback);
2808 file, callback);
2809 } 2807 }
2810 2808
2811 const std::string& WebContentsImpl::GetContentsMimeType() const { 2809 const std::string& WebContentsImpl::GetContentsMimeType() const {
2812 return contents_mime_type_; 2810 return contents_mime_type_;
2813 } 2811 }
2814 2812
2815 bool WebContentsImpl::WillNotifyDisconnection() const { 2813 bool WebContentsImpl::WillNotifyDisconnection() const {
2816 return notify_disconnection_; 2814 return notify_disconnection_;
2817 } 2815 }
2818 2816
(...skipping 2214 matching lines...) Expand 10 before | Expand all | Expand 10 after
5033 for (RenderViewHost* render_view_host : render_view_host_set) 5031 for (RenderViewHost* render_view_host : render_view_host_set)
5034 render_view_host->OnWebkitPreferencesChanged(); 5032 render_view_host->OnWebkitPreferencesChanged();
5035 } 5033 }
5036 5034
5037 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 5035 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
5038 JavaScriptDialogManager* dialog_manager) { 5036 JavaScriptDialogManager* dialog_manager) {
5039 dialog_manager_ = dialog_manager; 5037 dialog_manager_ = dialog_manager;
5040 } 5038 }
5041 5039
5042 } // namespace content 5040 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/child/assert_matching_enums.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698