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

Side by Side Diff: base/process_util_linux.cc

Issue 3447008: base: Finish moving the SplitString functions from string_util.h to string_split.h (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: chromeos fixes Created 10 years, 3 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 | « base/command_line.cc ('k') | base/string_split.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "base/process_util.h" 5 #include "base/process_util.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 #include <dirent.h> 8 #include <dirent.h>
9 #include <dlfcn.h> 9 #include <dlfcn.h>
10 #include <errno.h> 10 #include <errno.h>
11 #include <fcntl.h> 11 #include <fcntl.h>
12 #include <sys/time.h> 12 #include <sys/time.h>
13 #include <sys/types.h> 13 #include <sys/types.h>
14 #include <sys/wait.h> 14 #include <sys/wait.h>
15 #include <time.h> 15 #include <time.h>
16 #include <unistd.h> 16 #include <unistd.h>
17 17
18 #include "base/file_util.h" 18 #include "base/file_util.h"
19 #include "base/logging.h" 19 #include "base/logging.h"
20 #include "base/string_number_conversions.h" 20 #include "base/string_number_conversions.h"
21 #include "base/string_split.h"
21 #include "base/string_tokenizer.h" 22 #include "base/string_tokenizer.h"
22 #include "base/string_util.h" 23 #include "base/string_util.h"
23 #include "base/sys_info.h" 24 #include "base/sys_info.h"
24 25
25 namespace { 26 namespace {
26 27
27 enum ParsingState { 28 enum ParsingState {
28 KEY_NAME, 29 KEY_NAME,
29 KEY_VALUE 30 KEY_VALUE
30 }; 31 };
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 643
643 if (!file_util::PathExists(oom_adj)) 644 if (!file_util::PathExists(oom_adj))
644 return false; 645 return false;
645 646
646 std::string score_str = base::IntToString(score); 647 std::string score_str = base::IntToString(score);
647 return (static_cast<int>(score_str.length()) == 648 return (static_cast<int>(score_str.length()) ==
648 file_util::WriteFile(oom_adj, score_str.c_str(), score_str.length())); 649 file_util::WriteFile(oom_adj, score_str.c_str(), score_str.length()));
649 } 650 }
650 651
651 } // namespace base 652 } // namespace base
OLDNEW
« no previous file with comments | « base/command_line.cc ('k') | base/string_split.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698