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

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

Issue 371063: Integrate BlacklistManager with Profile. (Closed)
Patch Set: trybot fixes Created 11 years 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/extensions_service.h" 5 #include "chrome/browser/extensions/extensions_service.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/histogram.h" 9 #include "base/histogram.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 Source<Profile>(profile_), 743 Source<Profile>(profile_),
744 Details<const std::string>(&error)); 744 Details<const std::string>(&error));
745 745
746 // TODO(port): note that this isn't guaranteed to work properly on Linux. 746 // TODO(port): note that this isn't guaranteed to work properly on Linux.
747 std::string path_str = WideToASCII(extension_path.ToWStringHack()); 747 std::string path_str = WideToASCII(extension_path.ToWStringHack());
748 std::string message = StringPrintf("Could not load extension from '%s'. %s", 748 std::string message = StringPrintf("Could not load extension from '%s'. %s",
749 path_str.c_str(), error.c_str()); 749 path_str.c_str(), error.c_str());
750 ExtensionErrorReporter::GetInstance()->ReportError(message, be_noisy); 750 ExtensionErrorReporter::GetInstance()->ReportError(message, be_noisy);
751 } 751 }
752 752
753 bool ExtensionsService::AreBlacklistPathsReady() const {
754 return ready_;
755 }
756
753 std::vector<FilePath> ExtensionsService::GetPersistentBlacklistPaths() { 757 std::vector<FilePath> ExtensionsService::GetPersistentBlacklistPaths() {
754 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); 758 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
755 759
756 std::vector<FilePath> result; 760 std::vector<FilePath> result;
757 for (ExtensionList::const_iterator extension_iter = extensions()->begin(); 761 for (ExtensionList::const_iterator extension_iter = extensions()->begin();
758 extension_iter != extensions()->end(); ++extension_iter) { 762 extension_iter != extensions()->end(); ++extension_iter) {
759 if ((*extension_iter)->location() == Extension::LOAD) 763 if ((*extension_iter)->location() == Extension::LOAD)
760 continue; 764 continue;
761 765
762 std::vector<Extension::PrivacyBlacklistInfo> blacklists( 766 std::vector<Extension::PrivacyBlacklistInfo> blacklists(
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 964
961 void ExtensionsServiceBackend::OnExternalExtensionFound( 965 void ExtensionsServiceBackend::OnExternalExtensionFound(
962 const std::string& id, const Version* version, const FilePath& path, 966 const std::string& id, const Version* version, const FilePath& path,
963 Extension::Location location) { 967 Extension::Location location) {
964 ChromeThread::PostTask( 968 ChromeThread::PostTask(
965 ChromeThread::UI, FROM_HERE, 969 ChromeThread::UI, FROM_HERE,
966 NewRunnableMethod( 970 NewRunnableMethod(
967 frontend_, &ExtensionsService::OnExternalExtensionFound, id, 971 frontend_, &ExtensionsService::OnExternalExtensionFound, id,
968 version->GetString(), path, location)); 972 version->GetString(), path, location));
969 } 973 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_service.h ('k') | chrome/browser/net/chrome_url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698