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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 1274123003: Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no media changes 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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 (*setter)(settings, it->second, GetScriptForWebSettings(code)); 593 (*setter)(settings, it->second, GetScriptForWebSettings(code));
594 } 594 }
595 } 595 }
596 } 596 }
597 597
598 void ApplyBlinkSettings(const base::CommandLine& command_line, 598 void ApplyBlinkSettings(const base::CommandLine& command_line,
599 WebSettings* settings) { 599 WebSettings* settings) {
600 if (!command_line.HasSwitch(switches::kBlinkSettings)) 600 if (!command_line.HasSwitch(switches::kBlinkSettings))
601 return; 601 return;
602 602
603 std::vector<std::string> blink_settings; 603 std::vector<std::string> blink_settings = base::SplitString(
604 base::SplitString( 604 command_line.GetSwitchValueASCII(switches::kBlinkSettings),
605 command_line.GetSwitchValueASCII(switches::kBlinkSettings), ',', 605 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
606 &blink_settings);
607 for (const std::string& setting : blink_settings) { 606 for (const std::string& setting : blink_settings) {
608 size_t pos = setting.find('='); 607 size_t pos = setting.find('=');
609 settings->setFromStrings( 608 settings->setFromStrings(
610 blink::WebString::fromLatin1(setting.substr(0, pos)), 609 blink::WebString::fromLatin1(setting.substr(0, pos)),
611 blink::WebString::fromLatin1( 610 blink::WebString::fromLatin1(
612 pos == std::string::npos ? "" : setting.substr(pos + 1))); 611 pos == std::string::npos ? "" : setting.substr(pos + 1)));
613 } 612 }
614 } 613 }
615 614
616 // Looks up and returns the WebFrame corresponding to a given opener frame 615 // Looks up and returns the WebFrame corresponding to a given opener frame
(...skipping 3208 matching lines...) Expand 10 before | Expand all | Expand 10 after
3825 std::vector<gfx::Size> sizes; 3824 std::vector<gfx::Size> sizes;
3826 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 3825 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
3827 if (!url.isEmpty()) 3826 if (!url.isEmpty())
3828 urls.push_back( 3827 urls.push_back(
3829 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 3828 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
3830 } 3829 }
3831 SendUpdateFaviconURL(urls); 3830 SendUpdateFaviconURL(urls);
3832 } 3831 }
3833 3832
3834 } // namespace content 3833 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc/stun_field_trial.cc ('k') | content/shell/renderer/layout_test/blink_test_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698