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

Side by Side Diff: base/version.cc

Issue 6410105: run iwyu on base! Base URL: svn://svn.chromium.org/chrome/trunk/src/base
Patch Set: Created 9 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « base/values.cc ('k') | base/vlog.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/version.h" 5 #include <stddef.h>
6 #include <algorithm>
7 #include <string>
8 #include <vector>
6 9
7 #include <algorithm> 10 #include "base/basictypes.h"
8
9 #include "base/logging.h" 11 #include "base/logging.h"
10 #include "base/string_number_conversions.h" 12 #include "base/string_number_conversions.h"
11 #include "base/string_split.h" 13 #include "base/string_split.h"
12 #include "base/string_util.h" 14 #include "base/version.h"
13 #include "base/utf_string_conversions.h"
14 15
15 Version::Version() : is_valid_(false) {} 16 Version::Version() : is_valid_(false) {}
16 17
17 Version::~Version() {} 18 Version::~Version() {}
18 19
19 // static 20 // static
20 Version* Version::GetVersionFromString(const std::string& version_str) { 21 Version* Version::GetVersionFromString(const std::string& version_str) {
21 Version* vers = new Version(); 22 Version* vers = new Version();
22 if (vers->InitFromString(version_str)) { 23 if (vers->InitFromString(version_str)) {
23 DCHECK(vers->is_valid_); 24 DCHECK(vers->is_valid_);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 return false; 94 return false;
94 // This throws out things like +3, or 032. 95 // This throws out things like +3, or 032.
95 if (base::IntToString(num) != *i) 96 if (base::IntToString(num) != *i)
96 return false; 97 return false;
97 uint16 component = static_cast<uint16>(num); 98 uint16 component = static_cast<uint16>(num);
98 components_.push_back(component); 99 components_.push_back(component);
99 } 100 }
100 is_valid_ = true; 101 is_valid_ = true;
101 return true; 102 return true;
102 } 103 }
OLDNEW
« no previous file with comments | « base/values.cc ('k') | base/vlog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698