Chromium Code Reviews

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

Issue 5535002: Decouple killbit testing from external extension providers (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: update Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/stateful_external_extension_provider.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/stateful_external_extension_provider.h" 5 #include "chrome/browser/extensions/stateful_external_extension_provider.h"
6 6
7 #include "app/app_paths.h" 7 #include "app/app_paths.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 15 matching lines...)
26 Extension::Location crx_location, 26 Extension::Location crx_location,
27 Extension::Location download_location) 27 Extension::Location download_location)
28 : crx_location_(crx_location), 28 : crx_location_(crx_location),
29 download_location_(download_location) { 29 download_location_(download_location) {
30 } 30 }
31 31
32 StatefulExternalExtensionProvider::~StatefulExternalExtensionProvider() { 32 StatefulExternalExtensionProvider::~StatefulExternalExtensionProvider() {
33 } 33 }
34 34
35 void StatefulExternalExtensionProvider::VisitRegisteredExtension( 35 void StatefulExternalExtensionProvider::VisitRegisteredExtension(
36 Visitor* visitor, const std::set<std::string>& ids_to_ignore) const { 36 Visitor* visitor) const {
37 for (DictionaryValue::key_iterator i = prefs_->begin_keys(); 37 for (DictionaryValue::key_iterator i = prefs_->begin_keys();
38 i != prefs_->end_keys(); ++i) { 38 i != prefs_->end_keys(); ++i) {
39 const std::string& extension_id = *i; 39 const std::string& extension_id = *i;
40 if (ids_to_ignore.find(extension_id) != ids_to_ignore.end())
41 continue;
42
43 DictionaryValue* extension; 40 DictionaryValue* extension;
44 if (!prefs_->GetDictionaryWithoutPathExpansion(extension_id, &extension)) 41 if (!prefs_->GetDictionaryWithoutPathExpansion(extension_id, &extension))
45 continue; 42 continue;
46 43
47 FilePath::StringType external_crx; 44 FilePath::StringType external_crx;
48 std::string external_version; 45 std::string external_version;
49 std::string external_update_url; 46 std::string external_update_url;
50 47
51 bool has_external_crx = extension->GetString(kExternalCrx, &external_crx); 48 bool has_external_crx = extension->GetString(kExternalCrx, &external_crx);
52 bool has_external_version = extension->GetString(kExternalVersion, 49 bool has_external_version = extension->GetString(kExternalVersion,
(...skipping 97 matching lines...)
150 } else { 147 } else {
151 NOTREACHED(); // Chrome should not allow prefs to get into this state. 148 NOTREACHED(); // Chrome should not allow prefs to get into this state.
152 return false; 149 return false;
153 } 150 }
154 151
155 if (location) 152 if (location)
156 *location = loc; 153 *location = loc;
157 154
158 return true; 155 return true;
159 } 156 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/stateful_external_extension_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine