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

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

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 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) 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/external_provider_impl.h" 5 #include "chrome/browser/extensions/external_provider_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 base::FilePath::StringType external_crx; 205 base::FilePath::StringType external_crx;
206 const base::Value* external_version_value = NULL; 206 const base::Value* external_version_value = NULL;
207 std::string external_version; 207 std::string external_version;
208 std::string external_update_url; 208 std::string external_update_url;
209 209
210 bool has_external_crx = extension->GetString(kExternalCrx, &external_crx); 210 bool has_external_crx = extension->GetString(kExternalCrx, &external_crx);
211 211
212 bool has_external_version = false; 212 bool has_external_version = false;
213 if (extension->Get(kExternalVersion, &external_version_value)) { 213 if (extension->Get(kExternalVersion, &external_version_value)) {
214 if (external_version_value->IsType(base::Value::TYPE_STRING)) { 214 if (external_version_value->IsType(base::Value::Type::STRING)) {
215 external_version_value->GetAsString(&external_version); 215 external_version_value->GetAsString(&external_version);
216 has_external_version = true; 216 has_external_version = true;
217 } else { 217 } else {
218 LOG(WARNING) << "Malformed extension dictionary for extension: " 218 LOG(WARNING) << "Malformed extension dictionary for extension: "
219 << extension_id.c_str() << ". " << kExternalVersion 219 << extension_id.c_str() << ". " << kExternalVersion
220 << " value must be a string."; 220 << " value must be a string.";
221 continue; 221 continue;
222 } 222 }
223 } 223 }
224 224
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 provider_list->push_back(std::move(drive_migration_provider)); 695 provider_list->push_back(std::move(drive_migration_provider));
696 } 696 }
697 697
698 provider_list->push_back(base::MakeUnique<ExternalProviderImpl>( 698 provider_list->push_back(base::MakeUnique<ExternalProviderImpl>(
699 service, new ExternalComponentLoader(profile), profile, 699 service, new ExternalComponentLoader(profile), profile,
700 Manifest::INVALID_LOCATION, Manifest::EXTERNAL_COMPONENT, 700 Manifest::INVALID_LOCATION, Manifest::EXTERNAL_COMPONENT,
701 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT)); 701 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT));
702 } 702 }
703 703
704 } // namespace extensions 704 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/extensions/policy_handlers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698