michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsVersionComparatorImpl.h" michael@0: #include "nsVersionComparator.h" michael@0: #include "nsString.h" michael@0: michael@0: NS_IMPL_ISUPPORTS(nsVersionComparatorImpl, nsIVersionComparator) michael@0: michael@0: NS_IMETHODIMP michael@0: nsVersionComparatorImpl::Compare(const nsACString& A, const nsACString& B, michael@0: int32_t *aResult) michael@0: { michael@0: *aResult = mozilla::CompareVersions(PromiseFlatCString(A).get(), michael@0: PromiseFlatCString(B).get()); michael@0: michael@0: return NS_OK; michael@0: }