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

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

Issue 1278973003: Revert of Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/crash_logging.h" 10 #include "base/debug/crash_logging.h"
(...skipping 2458 matching lines...) Expand 10 before | Expand all | Expand 10 after
2469 DownloadUrlParameters::FromWebContents(this, url)); 2469 DownloadUrlParameters::FromWebContents(this, url));
2470 params->set_referrer(referrer); 2470 params->set_referrer(referrer);
2471 params->set_post_id(post_id); 2471 params->set_post_id(post_id);
2472 if (post_id >= 0) 2472 if (post_id >= 0)
2473 params->set_method("POST"); 2473 params->set_method("POST");
2474 params->set_prompt(true); 2474 params->set_prompt(true);
2475 2475
2476 if (headers.empty()) { 2476 if (headers.empty()) {
2477 params->set_prefer_cache(true); 2477 params->set_prefer_cache(true);
2478 } else { 2478 } else {
2479 for (const base::StringPiece& key_value : 2479 std::vector<std::string> key_value_list;
2480 base::SplitStringPiece( 2480 base::SplitString(headers, '\n', &key_value_list);
2481 headers, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) { 2481 for (const auto& key_value : key_value_list) {
2482 std::vector<std::string> pair = base::SplitString( 2482 std::vector<std::string> pair;
2483 key_value, ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 2483 base::SplitString(key_value, ':', &pair);
2484 DCHECK_EQ(2ul, pair.size()); 2484 DCHECK_EQ(2ul, pair.size());
2485 params->add_request_header(pair[0], pair[1]); 2485 params->add_request_header(pair[0], pair[1]);
2486 } 2486 }
2487 } 2487 }
2488 dlm->DownloadUrl(params.Pass()); 2488 dlm->DownloadUrl(params.Pass());
2489 } 2489 }
2490 2490
2491 void WebContentsImpl::GenerateMHTML( 2491 void WebContentsImpl::GenerateMHTML(
2492 const base::FilePath& file, 2492 const base::FilePath& file,
2493 const base::Callback<void(int64)>& callback) { 2493 const base::Callback<void(int64)>& callback) {
(...skipping 2132 matching lines...) Expand 10 before | Expand all | Expand 10 after
4626 player_map->erase(it); 4626 player_map->erase(it);
4627 } 4627 }
4628 4628
4629 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4629 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4630 force_disable_overscroll_content_ = force_disable; 4630 force_disable_overscroll_content_ = force_disable;
4631 if (view_) 4631 if (view_)
4632 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4632 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4633 } 4633 }
4634 4634
4635 } // namespace content 4635 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_database.cc ('k') | content/child/runtime_features.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698