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 <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 return status; | 742 return status; |
743 if (switches->HasSwitch("disable-extensions")) { | 743 if (switches->HasSwitch("disable-extensions")) { |
744 UpdateExtensionSwitch(switches, "load-component-extension", | 744 UpdateExtensionSwitch(switches, "load-component-extension", |
745 automation_extension.value()); | 745 automation_extension.value()); |
746 } else { | 746 } else { |
747 extension_paths.push_back(automation_extension.value()); | 747 extension_paths.push_back(automation_extension.value()); |
748 } | 748 } |
749 } | 749 } |
750 | 750 |
751 if (extension_paths.size()) { | 751 if (extension_paths.size()) { |
752 base::FilePath::StringType extension_paths_value = JoinString( | 752 base::FilePath::StringType extension_paths_value = base::JoinString( |
753 extension_paths, FILE_PATH_LITERAL(',')); | 753 extension_paths, base::FilePath::StringType(1, ',')); |
754 UpdateExtensionSwitch(switches, "load-extension", extension_paths_value); | 754 UpdateExtensionSwitch(switches, "load-extension", extension_paths_value); |
755 } | 755 } |
756 bg_pages->swap(bg_pages_tmp); | 756 bg_pages->swap(bg_pages_tmp); |
757 return Status(kOk); | 757 return Status(kOk); |
758 } | 758 } |
759 | 759 |
760 Status WritePrefsFile( | 760 Status WritePrefsFile( |
761 const std::string& template_string, | 761 const std::string& template_string, |
762 const base::DictionaryValue* custom_prefs, | 762 const base::DictionaryValue* custom_prefs, |
763 const base::FilePath& path) { | 763 const base::FilePath& path) { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 // Write empty "First Run" file, otherwise Chrome will wipe the default | 833 // Write empty "First Run" file, otherwise Chrome will wipe the default |
834 // profile that was written. | 834 // profile that was written. |
835 if (base::WriteFile( | 835 if (base::WriteFile( |
836 user_data_dir.Append(chrome::kFirstRunSentinel), "", 0) != 0) { | 836 user_data_dir.Append(chrome::kFirstRunSentinel), "", 0) != 0) { |
837 return Status(kUnknownError, "failed to write first run file"); | 837 return Status(kUnknownError, "failed to write first run file"); |
838 } | 838 } |
839 return Status(kOk); | 839 return Status(kOk); |
840 } | 840 } |
841 | 841 |
842 } // namespace internal | 842 } // namespace internal |
OLD | NEW |