OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/test/chromedriver/chrome/browser_info.h" | 5 #include "chrome/test/chromedriver/chrome/browser_info.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
8 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
9 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_split.h" | 12 #include "base/strings/string_split.h" |
11 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
12 #include "base/values.h" | 14 #include "base/values.h" |
13 | 15 |
14 namespace { | 16 namespace { |
15 | 17 |
16 const std::string kVersionPrefix = "Chrome/"; | 18 const std::string kVersionPrefix = "Chrome/"; |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 return Status(kOk); | 148 return Status(kOk); |
147 } | 149 } |
148 | 150 |
149 bool IsGitHash(const std::string& revision) { | 151 bool IsGitHash(const std::string& revision) { |
150 const int kShortGitHashLength = 7; | 152 const int kShortGitHashLength = 7; |
151 const int kFullGitHashLength = 40; | 153 const int kFullGitHashLength = 40; |
152 return kShortGitHashLength <= revision.size() | 154 return kShortGitHashLength <= revision.size() |
153 && revision.size() <= kFullGitHashLength | 155 && revision.size() <= kFullGitHashLength |
154 && base::ContainsOnlyChars(revision, "0123456789abcdefABCDEF"); | 156 && base::ContainsOnlyChars(revision, "0123456789abcdefABCDEF"); |
155 } | 157 } |
OLD | NEW |