OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/pdf/adobe_reader_info_win.h" | 5 #include "chrome/browser/ui/pdf/adobe_reader_info_win.h" |
6 | 6 |
7 #include <shlwapi.h> | 7 #include <shlwapi.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <vector> | 10 #include <vector> |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/plugins/plugin_finder.h" | 21 #include "chrome/browser/plugins/plugin_finder.h" |
22 #include "chrome/browser/plugins/plugin_metadata.h" | 22 #include "chrome/browser/plugins/plugin_metadata.h" |
23 #include "chrome/browser/plugins/plugin_prefs.h" | 23 #include "chrome/browser/plugins/plugin_prefs.h" |
24 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
25 #include "chrome/browser/profiles/profile_manager.h" | 25 #include "chrome/browser/profiles/profile_manager.h" |
26 #include "content/public/browser/plugin_service.h" | 26 #include "content/public/browser/plugin_service.h" |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 // Hardcoded value for the secure version of Acrobat Reader. | 30 // Hardcoded value for the secure version of Acrobat Reader. |
31 const char kSecureVersion[] = "11.0.7.79"; | 31 const char kSecureVersion[] = "11.0.8.4"; |
32 | 32 |
33 const char kAdobeReaderIdentifier[] = "adobe-reader"; | 33 const char kAdobeReaderIdentifier[] = "adobe-reader"; |
34 const char kPdfMimeType[] = "application/pdf"; | 34 const char kPdfMimeType[] = "application/pdf"; |
35 const base::char16 kRegistryAcrobat[] = L"Acrobat.exe"; | 35 const base::char16 kRegistryAcrobat[] = L"Acrobat.exe"; |
36 const base::char16 kRegistryAcrobatReader[] = L"AcroRd32.exe"; | 36 const base::char16 kRegistryAcrobatReader[] = L"AcroRd32.exe"; |
37 const base::char16 kRegistryApps[] = | 37 const base::char16 kRegistryApps[] = |
38 L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths"; | 38 L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths"; |
39 const base::char16 kRegistryPath[] = L"Path"; | 39 const base::char16 kRegistryPath[] = L"Path"; |
40 | 40 |
41 // Gets the installed path for a registered app. | 41 // Gets the installed path for a registered app. |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 base::UTF16ToUTF8(file_version_info->product_version()); | 174 base::UTF16ToUTF8(file_version_info->product_version()); |
175 // Convert 1.2.03.45 to 1.2.3.45 so base::Version considers it as valid. | 175 // Convert 1.2.03.45 to 1.2.3.45 so base::Version considers it as valid. |
176 for (int i = 1; i <= 9; ++i) { | 176 for (int i = 1; i <= 9; ++i) { |
177 std::string from = base::StringPrintf(".0%d", i); | 177 std::string from = base::StringPrintf(".0%d", i); |
178 std::string to = base::StringPrintf(".%d", i); | 178 std::string to = base::StringPrintf(".%d", i); |
179 ReplaceSubstringsAfterOffset(&reader_version, 0, from, to); | 179 ReplaceSubstringsAfterOffset(&reader_version, 0, from, to); |
180 } | 180 } |
181 base::Version file_version(reader_version); | 181 base::Version file_version(reader_version); |
182 return file_version.IsValid() && !file_version.IsOlderThan(kSecureVersion); | 182 return file_version.IsValid() && !file_version.IsOlderThan(kSecureVersion); |
183 } | 183 } |
OLD | NEW |