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

Side by Side Diff: chrome/browser/ui/webui/about_ui.cc

Issue 1284833004: Remove remaining legacy SplitString calls. (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
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chromecast/base/metrics/cast_metrics_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/ui/webui/about_ui.h" 5 #include "chrome/browser/ui/webui/about_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 chrome::kChromeUIDiscardsURL, 529 chrome::kChromeUIDiscardsURL,
530 kAboutDiscardsRunCommand, it->tab_contents_id); 530 kAboutDiscardsRunCommand, it->tab_contents_id);
531 } 531 }
532 titles.push_back(str); 532 titles.push_back(str);
533 } 533 }
534 return titles; 534 return titles;
535 } 535 }
536 536
537 std::string AboutDiscards(const std::string& path) { 537 std::string AboutDiscards(const std::string& path) {
538 std::string output; 538 std::string output;
539 std::vector<std::string> path_split;
540 int64 web_content_id; 539 int64 web_content_id;
541 memory::OomPriorityManager* oom = g_browser_process->GetOomPriorityManager(); 540 memory::OomPriorityManager* oom = g_browser_process->GetOomPriorityManager();
542 541
543 base::SplitString(path, '/', &path_split); 542 std::vector<std::string> path_split = base::SplitString(
543 path, "/", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
544 if (path_split.size() == 2 && path_split[0] == kAboutDiscardsRunCommand && 544 if (path_split.size() == 2 && path_split[0] == kAboutDiscardsRunCommand &&
545 base::StringToInt64(path_split[1], &web_content_id)) { 545 base::StringToInt64(path_split[1], &web_content_id)) {
546 oom->DiscardTabById(web_content_id); 546 oom->DiscardTabById(web_content_id);
547 return BuildAboutDiscardsRunPage(); 547 return BuildAboutDiscardsRunPage();
548 } else if (path_split.size() == 1 && 548 } else if (path_split.size() == 1 &&
549 path_split[0] == kAboutDiscardsRunCommand) { 549 path_split[0] == kAboutDiscardsRunCommand) {
550 oom->DiscardTab(); 550 oom->DiscardTab();
551 return BuildAboutDiscardsRunPage(); 551 return BuildAboutDiscardsRunPage();
552 } 552 }
553 553
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 Profile* profile = Profile::FromWebUI(web_ui); 1028 Profile* profile = Profile::FromWebUI(web_ui);
1029 1029
1030 #if defined(ENABLE_THEMES) 1030 #if defined(ENABLE_THEMES)
1031 // Set up the chrome://theme/ source. 1031 // Set up the chrome://theme/ source.
1032 ThemeSource* theme = new ThemeSource(profile); 1032 ThemeSource* theme = new ThemeSource(profile);
1033 content::URLDataSource::Add(profile, theme); 1033 content::URLDataSource::Add(profile, theme);
1034 #endif 1034 #endif
1035 1035
1036 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); 1036 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile));
1037 } 1037 }
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chromecast/base/metrics/cast_metrics_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698