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

Side by Side Diff: chrome/browser/plugins/plugin_finder.cc

Issue 2262713003: Consistently use namespaced base::Version in plugins code. (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/browser/plugins/plugin_metadata.h » ('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/plugins/plugin_finder.h" 5 #include "chrome/browser/plugins/plugin_finder.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 std::string version; 131 std::string version;
132 success = version_dict->GetString("version", &version); 132 success = version_dict->GetString("version", &version);
133 DCHECK(success); 133 DCHECK(success);
134 std::string status_str; 134 std::string status_str;
135 success = version_dict->GetString("status", &status_str); 135 success = version_dict->GetString("status", &status_str);
136 DCHECK(success); 136 DCHECK(success);
137 PluginMetadata::SecurityStatus status = 137 PluginMetadata::SecurityStatus status =
138 PluginMetadata::SECURITY_STATUS_UP_TO_DATE; 138 PluginMetadata::SECURITY_STATUS_UP_TO_DATE;
139 success = PluginMetadata::ParseSecurityStatus(status_str, &status); 139 success = PluginMetadata::ParseSecurityStatus(status_str, &status);
140 DCHECK(success); 140 DCHECK(success);
141 plugin->AddVersion(Version(version), status); 141 plugin->AddVersion(base::Version(version), status);
142 } 142 }
143 } 143 }
144 144
145 LoadMimeTypes(false, plugin_dict, plugin); 145 LoadMimeTypes(false, plugin_dict, plugin);
146 LoadMimeTypes(true, plugin_dict, plugin); 146 LoadMimeTypes(true, plugin_dict, plugin);
147 return plugin; 147 return plugin;
148 } 148 }
149 149
150 void RecordBuiltInPluginListError(PluginListError error_code) { 150 void RecordBuiltInPluginListError(PluginListError error_code) {
151 UMA_HISTOGRAM_ENUMERATION("PluginFinder.BuiltInPluginList.ErrorCode", 151 UMA_HISTOGRAM_ENUMERATION("PluginFinder.BuiltInPluginList.ErrorCode",
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 metadata->AddMatchingMimeType(plugin.mime_types[i].mime_type); 353 metadata->AddMatchingMimeType(plugin.mime_types[i].mime_type);
354 354
355 DCHECK(metadata->MatchesPlugin(plugin)); 355 DCHECK(metadata->MatchesPlugin(plugin));
356 if (identifier_plugin_.find(identifier) != identifier_plugin_.end()) 356 if (identifier_plugin_.find(identifier) != identifier_plugin_.end())
357 identifier = GetLongIdentifier(plugin); 357 identifier = GetLongIdentifier(plugin);
358 358
359 DCHECK(identifier_plugin_.find(identifier) == identifier_plugin_.end()); 359 DCHECK(identifier_plugin_.find(identifier) == identifier_plugin_.end());
360 identifier_plugin_[identifier] = metadata; 360 identifier_plugin_[identifier] = metadata;
361 return metadata->Clone(); 361 return metadata->Clone();
362 } 362 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/plugins/plugin_metadata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698