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

Side by Side Diff: chrome/browser/extensions/updater/extension_downloader.cc

Issue 634583003: Simplify VersionInfo code, avoid hitting sandbox IPC constantly on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: linux include Created 6 years, 2 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
« no previous file with comments | « chrome/browser/diagnostics/recon_diagnostics.cc ('k') | chrome/browser/memory_details_mac.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/updater/extension_downloader.h" 5 #include "chrome/browser/extensions/updater/extension_downloader.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 continue; 665 continue;
666 } 666 }
667 } 667 }
668 } 668 }
669 669
670 // If the update specifies a browser minimum version, do we qualify? 670 // If the update specifies a browser minimum version, do we qualify?
671 if (update->browser_min_version.length() > 0) { 671 if (update->browser_min_version.length() > 0) {
672 // First determine the browser version if we haven't already. 672 // First determine the browser version if we haven't already.
673 if (!browser_version.IsValid()) { 673 if (!browser_version.IsValid()) {
674 chrome::VersionInfo version_info; 674 chrome::VersionInfo version_info;
675 if (version_info.is_valid()) 675 browser_version = Version(version_info.Version());
676 browser_version = Version(version_info.Version());
677 } 676 }
678 Version browser_min_version(update->browser_min_version); 677 Version browser_min_version(update->browser_min_version);
679 if (browser_version.IsValid() && browser_min_version.IsValid() && 678 if (browser_version.IsValid() && browser_min_version.IsValid() &&
680 browser_min_version.CompareTo(browser_version) > 0) { 679 browser_min_version.CompareTo(browser_version) > 0) {
681 // TODO(asargent) - We may want this to show up in the extensions UI 680 // TODO(asargent) - We may want this to show up in the extensions UI
682 // eventually. (http://crbug.com/12547). 681 // eventually. (http://crbug.com/12547).
683 LOG(WARNING) << "Updated version of extension " << id 682 LOG(WARNING) << "Updated version of extension " << id
684 << " available, but requires chrome version " 683 << " available, but requires chrome version "
685 << update->browser_min_version; 684 << update->browser_min_version;
686 continue; 685 continue;
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 ping_mode = ManifestFetchData::PING_WITH_METRICS; 955 ping_mode = ManifestFetchData::PING_WITH_METRICS;
957 } else { 956 } else {
958 ping_mode = ManifestFetchData::PING; 957 ping_mode = ManifestFetchData::PING;
959 } 958 }
960 } 959 }
961 return new ManifestFetchData( 960 return new ManifestFetchData(
962 update_url, request_id, brand_code_, manifest_query_params_, ping_mode); 961 update_url, request_id, brand_code_, manifest_query_params_, ping_mode);
963 } 962 }
964 963
965 } // namespace extensions 964 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/diagnostics/recon_diagnostics.cc ('k') | chrome/browser/memory_details_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698