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

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

Issue 2184913006: chrome/common: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | chrome/common/trace_event_args_whitelist.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 <memory> 9 #include <memory>
10 #include <tuple> 10 #include <tuple>
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 // static 495 // static
496 content::PepperPluginInfo* ChromeContentClient::FindMostRecentPlugin( 496 content::PepperPluginInfo* ChromeContentClient::FindMostRecentPlugin(
497 const std::vector<content::PepperPluginInfo*>& plugins) { 497 const std::vector<content::PepperPluginInfo*>& plugins) {
498 if (plugins.empty()) 498 if (plugins.empty())
499 return nullptr; 499 return nullptr;
500 500
501 using PluginSortKey = std::tuple<base::Version, bool, bool, bool, bool>; 501 using PluginSortKey = std::tuple<base::Version, bool, bool, bool, bool>;
502 502
503 std::map<PluginSortKey, content::PepperPluginInfo*> plugin_map; 503 std::map<PluginSortKey, content::PepperPluginInfo*> plugin_map;
504 504
505 for (const auto& plugin : plugins) { 505 for (auto* plugin : plugins) {
506 Version version(plugin->version); 506 Version version(plugin->version);
507 DCHECK(version.IsValid()); 507 DCHECK(version.IsValid());
508 plugin_map[PluginSortKey(version, plugin->is_debug, 508 plugin_map[PluginSortKey(version, plugin->is_debug,
509 plugin->is_bundled, plugin->is_on_local_drive, 509 plugin->is_bundled, plugin->is_on_local_drive,
510 !plugin->is_external)] = plugin; 510 !plugin->is_external)] = plugin;
511 } 511 }
512 512
513 return plugin_map.rbegin()->second; 513 return plugin_map.rbegin()->second;
514 } 514 }
515 #endif // defined(ENABLE_PLUGINS) 515 #endif // defined(ENABLE_PLUGINS)
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 origin_trial_policy_ = base::WrapUnique(new ChromeOriginTrialPolicy()); 718 origin_trial_policy_ = base::WrapUnique(new ChromeOriginTrialPolicy());
719 } 719 }
720 return origin_trial_policy_.get(); 720 return origin_trial_policy_.get();
721 } 721 }
722 722
723 #if defined(OS_ANDROID) 723 #if defined(OS_ANDROID)
724 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { 724 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() {
725 return new ChromeMediaClientAndroid(); 725 return new ChromeMediaClientAndroid();
726 } 726 }
727 #endif // OS_ANDROID 727 #endif // OS_ANDROID
OLDNEW
« no previous file with comments | « no previous file | chrome/common/trace_event_args_whitelist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698