Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package


// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.


#include <string>

#include "base/basictypes.h"

namespace installer {

class Version {
  virtual ~Version();

  // Check if the current version is higher than the version object passed
  // as parameter
  bool IsHigherThan(const Version* other) const;

  // Return the string representation of this version
  const std::wstring& GetString() const {
    return version_str_;

  // Assume that the version string is specified by four integers separated
  // by character '.'. Return NULL if string is not of this format.
  // Caller is responsible for freeing the Version object once done.
  static Version* GetVersionFromString(const std::wstring& version_str);

  int64 major_;
  int64 minor_;
  int64 build_;
  int64 patch_;
  std::wstring version_str_;

  // Classes outside this file do not have any need to create objects of
  // this type so declare constructor as private.
  Version(int64 major, int64 minor, int64 build, int64 patch);

}  // namespace installer


Generated by  Doxygen 1.6.0   Back to index