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

Side by Side Diff: chrome/test/webdriver/commands/chrome_commands.cc

Issue 12286020: Replace FilePath with base::FilePath. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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/test/webdriver/commands/chrome_commands.h" 5 #include "chrome/test/webdriver/commands/chrome_commands.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return; 67 return;
68 } 68 }
69 69
70 id_list.Append(new base::StringValue(extension_id)); 70 id_list.Append(new base::StringValue(extension_id));
71 } 71 }
72 72
73 response->SetValue(id_list.DeepCopy()); 73 response->SetValue(id_list.DeepCopy());
74 } 74 }
75 75
76 void ExtensionsCommand::ExecutePost(Response* const response) { 76 void ExtensionsCommand::ExecutePost(Response* const response) {
77 FilePath::StringType path_string; 77 base::FilePath::StringType path_string;
78 if (!GetStringParameter("path", &path_string)) { 78 if (!GetStringParameter("path", &path_string)) {
79 response->SetError(new Error(kBadRequest, "'path' missing or invalid")); 79 response->SetError(new Error(kBadRequest, "'path' missing or invalid"));
80 return; 80 return;
81 } 81 }
82 82
83 std::string extension_id; 83 std::string extension_id;
84 Error* error = session_->InstallExtension( 84 Error* error = session_->InstallExtension(
85 FilePath(path_string), &extension_id); 85 base::FilePath(path_string), &extension_id);
86 if (error) { 86 if (error) {
87 response->SetError(error); 87 response->SetError(error);
88 return; 88 return;
89 } 89 }
90 response->SetValue(new base::StringValue(extension_id)); 90 response->SetValue(new base::StringValue(extension_id));
91 } 91 }
92 92
93 ExtensionCommand::ExtensionCommand( 93 ExtensionCommand::ExtensionCommand(
94 const std::vector<std::string>& path_segments, 94 const std::vector<std::string>& path_segments,
95 const DictionaryValue* const parameters) 95 const DictionaryValue* const parameters)
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 276
277 Error* error = session_->HeapProfilerDump(reason); 277 Error* error = session_->HeapProfilerDump(reason);
278 if (error) { 278 if (error) {
279 response->SetError(error); 279 response->SetError(error);
280 return; 280 return;
281 } 281 }
282 } 282 }
283 #endif // !defined(NO_TCMALLOC) && (defined(OS_LINUX) || defined(OS_CHROMEOS)) 283 #endif // !defined(NO_TCMALLOC) && (defined(OS_LINUX) || defined(OS_CHROMEOS))
284 284
285 } // namespace webdriver 285 } // namespace webdriver
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698