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

Side by Side Diff: chrome/browser/ui/webui/plugins/plugins_handler.cc

Issue 2608513002: Remove mojo::String. (Closed)
Patch Set: Created 3 years, 11 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ui/webui/plugins/plugins_handler.h" 5 #include "chrome/browser/ui/webui/plugins/plugins_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 272
273 mojom::PluginFilePtr PluginsPageHandler::GeneratePluginFile( 273 mojom::PluginFilePtr PluginsPageHandler::GeneratePluginFile(
274 const WebPluginInfo& plugin, 274 const WebPluginInfo& plugin,
275 const base::string16& group_name, 275 const base::string16& group_name,
276 bool plugin_enabled) const { 276 bool plugin_enabled) const {
277 mojom::PluginFilePtr plugin_file(mojom::PluginFile::New()); 277 mojom::PluginFilePtr plugin_file(mojom::PluginFile::New());
278 plugin_file->description = base::UTF16ToUTF8(GetPluginDescription(plugin)); 278 plugin_file->description = base::UTF16ToUTF8(GetPluginDescription(plugin));
279 plugin_file->enabled_mode = 279 plugin_file->enabled_mode =
280 GetPluginEnabledMode(plugin.name, group_name, plugin_enabled); 280 GetPluginEnabledMode(plugin.name, group_name, plugin_enabled);
281 plugin_file->name = base::UTF16ToUTF8(plugin.name); 281 plugin_file->name = base::UTF16ToUTF8(plugin.name);
282 plugin_file->path = mojo::String::From(plugin.path.value()); 282 plugin_file->path = plugin.path.AsUTF8Unsafe();
283 plugin_file->type = base::UTF16ToUTF8(PluginTypeToString(plugin.type)); 283 plugin_file->type = base::UTF16ToUTF8(PluginTypeToString(plugin.type));
284 plugin_file->version = base::UTF16ToUTF8(plugin.version); 284 plugin_file->version = base::UTF16ToUTF8(plugin.version);
285 plugin_file->mime_types = GeneratePluginMimeTypes(plugin); 285 plugin_file->mime_types = GeneratePluginMimeTypes(plugin);
286 286
287 return plugin_file; 287 return plugin_file;
288 } 288 }
289 289
290 std::string PluginsPageHandler::GetPluginEnabledMode( 290 std::string PluginsPageHandler::GetPluginEnabledMode(
291 const base::string16& plugin_name, 291 const base::string16& plugin_name,
292 const base::string16& group_name, 292 const base::string16& group_name,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 } 329 }
330 330
331 if (plugins_enabled_by_policy) 331 if (plugins_enabled_by_policy)
332 return "enabledByPolicy"; 332 return "enabledByPolicy";
333 if (plugins_disabled_by_policy) 333 if (plugins_disabled_by_policy)
334 return "disabledByPolicy"; 334 return "disabledByPolicy";
335 if (plugins_managed_by_policy) 335 if (plugins_managed_by_policy)
336 return "managedByPolicy"; 336 return "managedByPolicy";
337 return group_enabled ? "enabledByUser" : "disabledByUser"; 337 return group_enabled ? "enabledByUser" : "disabledByUser";
338 } 338 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698