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

Side by Side Diff: chrome/browser/extensions/extension_updater.cc

Issue 5815001: Fixed file_version_info so that it finds Mac values correctly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added a file Created 10 years 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
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 "chrome/browser/extensions/extension_updater.h" 5 #include "chrome/browser/extensions/extension_updater.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 update_version->CompareTo(*(existing_version.get())) <= 0) { 820 update_version->CompareTo(*(existing_version.get())) <= 0) {
821 continue; 821 continue;
822 } 822 }
823 } 823 }
824 824
825 // If the update specifies a browser minimum version, do we qualify? 825 // If the update specifies a browser minimum version, do we qualify?
826 if (update->browser_min_version.length() > 0) { 826 if (update->browser_min_version.length() > 0) {
827 // First determine the browser version if we haven't already. 827 // First determine the browser version if we haven't already.
828 if (!browser_version.get()) { 828 if (!browser_version.get()) {
829 chrome::VersionInfo version_info; 829 chrome::VersionInfo version_info;
830 if (version_info.is_valid()) { 830 browser_version.reset(Version::GetVersionFromString(
831 browser_version.reset(Version::GetVersionFromString( 831 version_info.Version()));
832 version_info.Version()));
833 }
834 } 832 }
835 scoped_ptr<Version> browser_min_version( 833 scoped_ptr<Version> browser_min_version(
836 Version::GetVersionFromString(update->browser_min_version)); 834 Version::GetVersionFromString(update->browser_min_version));
837 if (browser_version.get() && browser_min_version.get() && 835 if (browser_version.get() && browser_min_version.get() &&
838 browser_min_version->CompareTo(*browser_version.get()) > 0) { 836 browser_min_version->CompareTo(*browser_version.get()) > 0) {
839 // TODO(asargent) - We may want this to show up in the extensions UI 837 // TODO(asargent) - We may want this to show up in the extensions UI
840 // eventually. (http://crbug.com/12547). 838 // eventually. (http://crbug.com/12547).
841 LOG(WARNING) << "Updated version of extension " << update->extension_id 839 LOG(WARNING) << "Updated version of extension " << update->extension_id
842 << " available, but requires chrome version " 840 << " available, but requires chrome version "
843 << update->browser_min_version; 841 << update->browser_min_version;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this)); 903 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this));
906 extension_fetcher_->set_request_context( 904 extension_fetcher_->set_request_context(
907 Profile::GetDefaultRequestContext()); 905 Profile::GetDefaultRequestContext());
908 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES | 906 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES |
909 net::LOAD_DO_NOT_SAVE_COOKIES | 907 net::LOAD_DO_NOT_SAVE_COOKIES |
910 net::LOAD_DISABLE_CACHE); 908 net::LOAD_DISABLE_CACHE);
911 extension_fetcher_->Start(); 909 extension_fetcher_->Start();
912 current_extension_fetch_ = ExtensionFetch(id, url, hash, version); 910 current_extension_fetch_ = ExtensionFetch(id, url, hash, version);
913 } 911 }
914 } 912 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698