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

Side by Side Diff: chrome/common/chrome_content_client.cc

Issue 1575523002: Comparison and streaming operators for base::Version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes mistake in previous patch set. Created 4 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
« no previous file with comments | « chrome/browser/ui/startup/default_browser_prompt.cc ('k') | chrome/installer/setup/install.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/common/chrome_content_client.h" 5 #include "chrome/common/chrome_content_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/crash_logging.h" 10 #include "base/debug/crash_logging.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 #if defined(ENABLE_PLUGINS) 463 #if defined(ENABLE_PLUGINS)
464 // static 464 // static
465 content::PepperPluginInfo* ChromeContentClient::FindMostRecentPlugin( 465 content::PepperPluginInfo* ChromeContentClient::FindMostRecentPlugin(
466 const std::vector<content::PepperPluginInfo*>& plugins) { 466 const std::vector<content::PepperPluginInfo*>& plugins) {
467 auto it = std::max_element( 467 auto it = std::max_element(
468 plugins.begin(), plugins.end(), 468 plugins.begin(), plugins.end(),
469 [](content::PepperPluginInfo* x, content::PepperPluginInfo* y) { 469 [](content::PepperPluginInfo* x, content::PepperPluginInfo* y) {
470 Version version_x(x->version); 470 Version version_x(x->version);
471 Version version_y(y->version); 471 Version version_y(y->version);
472 DCHECK(version_x.IsValid() && version_y.IsValid()); 472 DCHECK(version_x.IsValid() && version_y.IsValid());
473 if (version_x.Equals(version_y)) 473 if (version_x == version_y)
474 return !x->is_debug && y->is_debug; 474 return !x->is_debug && y->is_debug;
475 return version_x.IsOlderThan(y->version); 475 return version_x < version_y;
476 }); 476 });
477 return it != plugins.end() ? *it : nullptr; 477 return it != plugins.end() ? *it : nullptr;
478 } 478 }
479 #endif // defined(ENABLE_PLUGINS) 479 #endif // defined(ENABLE_PLUGINS)
480 480
481 void ChromeContentClient::AddPepperPlugins( 481 void ChromeContentClient::AddPepperPlugins(
482 std::vector<content::PepperPluginInfo>* plugins) { 482 std::vector<content::PepperPluginInfo>* plugins) {
483 #if defined(ENABLE_PLUGINS) 483 #if defined(ENABLE_PLUGINS)
484 ComputeBuiltInPlugins(plugins); 484 ComputeBuiltInPlugins(plugins);
485 AddPepperFlashFromCommandLine(plugins); 485 AddPepperFlashFromCommandLine(plugins);
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 #endif 630 #endif
631 } 631 }
632 632
633 bool ChromeContentClient::IsSupplementarySiteIsolationModeEnabled() { 633 bool ChromeContentClient::IsSupplementarySiteIsolationModeEnabled() {
634 #if defined(ENABLE_EXTENSIONS) 634 #if defined(ENABLE_EXTENSIONS)
635 return extensions::IsIsolateExtensionsEnabled(); 635 return extensions::IsIsolateExtensionsEnabled();
636 #else 636 #else
637 return false; 637 return false;
638 #endif 638 #endif
639 } 639 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/default_browser_prompt.cc ('k') | chrome/installer/setup/install.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698