OLD | NEW |
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/test/chromedriver/chrome_launcher.h" | 5 #include "chrome/test/chromedriver/chrome_launcher.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <utility> | 10 #include <utility> |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 Status status = internal::PrepareUserDataDir(user_data_dir_path, | 155 Status status = internal::PrepareUserDataDir(user_data_dir_path, |
156 capabilities.prefs.get(), | 156 capabilities.prefs.get(), |
157 capabilities.local_state.get()); | 157 capabilities.local_state.get()); |
158 if (status.IsError()) | 158 if (status.IsError()) |
159 return status; | 159 return status; |
160 | 160 |
161 if (!extension_dir->CreateUniqueTempDir()) { | 161 if (!extension_dir->CreateUniqueTempDir()) { |
162 return Status(kUnknownError, | 162 return Status(kUnknownError, |
163 "cannot create temp dir for unpacking extensions"); | 163 "cannot create temp dir for unpacking extensions"); |
164 } | 164 } |
165 status = internal::ProcessExtensions(capabilities.extensions, | 165 status = internal::ProcessExtensions( |
166 extension_dir->GetPath(), true, | 166 capabilities.extensions, extension_dir->GetPath(), |
167 &switches, extension_bg_pages); | 167 capabilities.use_automation_extension, &switches, extension_bg_pages); |
168 if (status.IsError()) | 168 if (status.IsError()) |
169 return status; | 169 return status; |
170 switches.AppendToCommandLine(&command); | 170 switches.AppendToCommandLine(&command); |
171 *prepared_command = command; | 171 *prepared_command = command; |
172 return Status(kOk); | 172 return Status(kOk); |
173 } | 173 } |
174 | 174 |
175 Status WaitForDevToolsAndCheckVersion( | 175 Status WaitForDevToolsAndCheckVersion( |
176 const NetAddress& address, | 176 const NetAddress& address, |
177 URLRequestContextGetter* context_getter, | 177 URLRequestContextGetter* context_getter, |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 // Write empty "First Run" file, otherwise Chrome will wipe the default | 881 // Write empty "First Run" file, otherwise Chrome will wipe the default |
882 // profile that was written. | 882 // profile that was written. |
883 if (base::WriteFile( | 883 if (base::WriteFile( |
884 user_data_dir.Append(chrome::kFirstRunSentinel), "", 0) != 0) { | 884 user_data_dir.Append(chrome::kFirstRunSentinel), "", 0) != 0) { |
885 return Status(kUnknownError, "failed to write first run file"); | 885 return Status(kUnknownError, "failed to write first run file"); |
886 } | 886 } |
887 return Status(kOk); | 887 return Status(kOk); |
888 } | 888 } |
889 | 889 |
890 } // namespace internal | 890 } // namespace internal |
OLD | NEW |