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

Side by Side Diff: chrome/common/extensions/api/plugins/plugins_handler.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/extensions/api/plugins/plugins_handler.h" 5 #include "chrome/common/extensions/api/plugins/plugins_handler.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 std::string* error, 129 std::string* error,
130 std::vector<InstallWarning>* warnings) const { 130 std::vector<InstallWarning>* warnings) const {
131 // Validate claimed plugin paths. 131 // Validate claimed plugin paths.
132 if (extensions::PluginInfo::HasPlugins(extension)) { 132 if (extensions::PluginInfo::HasPlugins(extension)) {
133 const extensions::PluginInfo::PluginVector* plugins = 133 const extensions::PluginInfo::PluginVector* plugins =
134 extensions::PluginInfo::GetPlugins(extension); 134 extensions::PluginInfo::GetPlugins(extension);
135 CHECK(plugins); 135 CHECK(plugins);
136 for (std::vector<extensions::PluginInfo>::const_iterator plugin = 136 for (std::vector<extensions::PluginInfo>::const_iterator plugin =
137 plugins->begin(); 137 plugins->begin();
138 plugin != plugins->end(); ++plugin) { 138 plugin != plugins->end(); ++plugin) {
139 if (!file_util::PathExists(plugin->path)) { 139 if (!base::PathExists(plugin->path)) {
140 *error = l10n_util::GetStringFUTF8( 140 *error = l10n_util::GetStringFUTF8(
141 IDS_EXTENSION_LOAD_PLUGIN_PATH_FAILED, 141 IDS_EXTENSION_LOAD_PLUGIN_PATH_FAILED,
142 plugin->path.LossyDisplayName()); 142 plugin->path.LossyDisplayName());
143 return false; 143 return false;
144 } 144 }
145 } 145 }
146 } 146 }
147 return true; 147 return true;
148 } 148 }
149 149
150 } // namespace extensions 150 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/i18n/default_locale_handler.cc ('k') | chrome/common/extensions/background_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698