| OLD | NEW |
| 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/browser/ui/webui/version_handler.h" | 5 #include "chrome/browser/ui/webui/version_handler.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 // Retrieves the executable and profile paths on the FILE thread. | 25 // Retrieves the executable and profile paths on the FILE thread. |
| 26 void GetFilePaths(const base::FilePath& profile_path, | 26 void GetFilePaths(const base::FilePath& profile_path, |
| 27 base::string16* exec_path_out, | 27 base::string16* exec_path_out, |
| 28 base::string16* profile_path_out) { | 28 base::string16* profile_path_out) { |
| 29 DCHECK_CURRENTLY_ON(content::BrowserThread::FILE); | 29 DCHECK_CURRENTLY_ON(content::BrowserThread::FILE); |
| 30 | 30 |
| 31 base::FilePath executable_path = base::MakeAbsoluteFilePath( | 31 base::FilePath executable_path = base::MakeAbsoluteFilePath( |
| 32 CommandLine::ForCurrentProcess()->GetProgram()); | 32 base::CommandLine::ForCurrentProcess()->GetProgram()); |
| 33 if (!executable_path.empty()) { | 33 if (!executable_path.empty()) { |
| 34 *exec_path_out = executable_path.LossyDisplayName(); | 34 *exec_path_out = executable_path.LossyDisplayName(); |
| 35 } else { | 35 } else { |
| 36 *exec_path_out = | 36 *exec_path_out = |
| 37 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_PATH_NOTFOUND); | 37 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_PATH_NOTFOUND); |
| 38 } | 38 } |
| 39 | 39 |
| 40 base::FilePath profile_path_copy(base::MakeAbsoluteFilePath(profile_path)); | 40 base::FilePath profile_path_copy(base::MakeAbsoluteFilePath(profile_path)); |
| 41 if (!profile_path.empty() && !profile_path_copy.empty()) { | 41 if (!profile_path.empty() && !profile_path_copy.empty()) { |
| 42 *profile_path_out = profile_path.LossyDisplayName(); | 42 *profile_path_out = profile_path.LossyDisplayName(); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 flash_version = info_array[i].version; | 141 flash_version = info_array[i].version; |
| 142 break; | 142 break; |
| 143 } | 143 } |
| 144 } | 144 } |
| 145 } | 145 } |
| 146 | 146 |
| 147 base::StringValue arg(flash_version); | 147 base::StringValue arg(flash_version); |
| 148 web_ui()->CallJavascriptFunction("returnFlashVersion", arg); | 148 web_ui()->CallJavascriptFunction("returnFlashVersion", arg); |
| 149 } | 149 } |
| 150 #endif // defined(ENABLE_PLUGINS) | 150 #endif // defined(ENABLE_PLUGINS) |
| OLD | NEW |