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

Side by Side Diff: chrome/browser/extensions/component_loader.cc

Issue 799643004: Combine PDF plugin into the Chromium binary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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/browser/extensions/component_loader.h" 5 #include "chrome/browser/extensions/component_loader.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 #endif 619 #endif
620 620
621 #if defined(GOOGLE_CHROME_BUILD) 621 #if defined(GOOGLE_CHROME_BUILD)
622 #if !defined(OS_CHROMEOS) // http://crbug.com/314799 622 #if !defined(OS_CHROMEOS) // http://crbug.com/314799
623 AddNetworkSpeechSynthesisExtension(); 623 AddNetworkSpeechSynthesisExtension();
624 #endif 624 #endif
625 625
626 #endif // defined(GOOGLE_CHROME_BUILD) 626 #endif // defined(GOOGLE_CHROME_BUILD)
627 627
628 #if defined(ENABLE_PLUGINS) 628 #if defined(ENABLE_PLUGINS)
629 base::FilePath pdf_path; 629 if (switches::OutOfProcessPdfEnabled()) {
630 content::PluginService* plugin_service =
631 content::PluginService::GetInstance();
632 if (switches::OutOfProcessPdfEnabled() &&
633 PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_path) &&
634 plugin_service->GetRegisteredPpapiPluginInfo(pdf_path)) {
635 if (switches::PdfMaterialUIEnabled()) 630 if (switches::PdfMaterialUIEnabled())
636 Add(IDR_PDF_MANIFEST_MATERIAL, base::FilePath(FILE_PATH_LITERAL("pdf"))); 631 Add(IDR_PDF_MANIFEST_MATERIAL, base::FilePath(FILE_PATH_LITERAL("pdf")));
637 else 632 else
638 Add(IDR_PDF_MANIFEST, base::FilePath(FILE_PATH_LITERAL("pdf"))); 633 Add(IDR_PDF_MANIFEST, base::FilePath(FILE_PATH_LITERAL("pdf")));
639 } 634 }
640 #endif 635 #endif
641 636
642 Add(IDR_CRYPTOTOKEN_MANIFEST, 637 Add(IDR_CRYPTOTOKEN_MANIFEST,
643 base::FilePath(FILE_PATH_LITERAL("cryptotoken"))); 638 base::FilePath(FILE_PATH_LITERAL("cryptotoken")));
644 } 639 }
(...skipping 20 matching lines...) Expand all
665 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); 660 off_the_record_context, Extension::GetBaseURLFromExtensionId(id));
666 storage::FileSystemContext* file_system_context = 661 storage::FileSystemContext* file_system_context =
667 content::BrowserContext::GetStoragePartitionForSite( 662 content::BrowserContext::GetStoragePartitionForSite(
668 off_the_record_context, site)->GetFileSystemContext(); 663 off_the_record_context, site)->GetFileSystemContext();
669 file_system_context->EnableTemporaryFileSystemInIncognito(); 664 file_system_context->EnableTemporaryFileSystemInIncognito();
670 } 665 }
671 #endif 666 #endif
672 } 667 }
673 668
674 } // namespace extensions 669 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698