OLD | NEW |
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/common/auto_start_linux.h" | 5 #include "chrome/common/auto_start_linux.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/environment.h" | 9 #include "base/environment.h" |
8 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
10 #include "base/logging.h" | 12 #include "base/logging.h" |
11 #include "base/nix/xdg_util.h" | 13 #include "base/nix/xdg_util.h" |
12 #include "base/strings/string_tokenizer.h" | 14 #include "base/strings/string_tokenizer.h" |
13 | 15 |
14 namespace { | 16 namespace { |
15 | 17 |
16 const base::FilePath::CharType kAutostart[] = "autostart"; | 18 const base::FilePath::CharType kAutostart[] = "autostart"; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 base::StringTokenizer tokenizer(contents, "\n"); | 84 base::StringTokenizer tokenizer(contents, "\n"); |
83 std::string token = value_name + "="; | 85 std::string token = value_name + "="; |
84 while (tokenizer.GetNext()) { | 86 while (tokenizer.GetNext()) { |
85 if (tokenizer.token().substr(0, token.length()) == token) { | 87 if (tokenizer.token().substr(0, token.length()) == token) { |
86 *value = tokenizer.token().substr(token.length()); | 88 *value = tokenizer.token().substr(token.length()); |
87 return true; | 89 return true; |
88 } | 90 } |
89 } | 91 } |
90 return false; | 92 return false; |
91 } | 93 } |
OLD | NEW |