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

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

Issue 2925193002: NOT YET READY: UMA recording the kind of target frame when extensions pierce browsing instance.
Patch Set: Rebasing... Created 3 years, 6 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 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/extensions/extension_management.h" 5 #include "chrome/browser/extensions/extension_management.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 } 380 }
381 } 381 }
382 382
383 if (allowed_types_pref) { 383 if (allowed_types_pref) {
384 global_settings_->has_restricted_allowed_types = true; 384 global_settings_->has_restricted_allowed_types = true;
385 for (base::ListValue::const_iterator it = allowed_types_pref->begin(); 385 for (base::ListValue::const_iterator it = allowed_types_pref->begin();
386 it != allowed_types_pref->end(); ++it) { 386 it != allowed_types_pref->end(); ++it) {
387 int int_value; 387 int int_value;
388 std::string string_value; 388 std::string string_value;
389 if (it->GetAsInteger(&int_value) && int_value >= 0 && 389 if (it->GetAsInteger(&int_value) && int_value >= 0 &&
390 int_value < Manifest::Type::NUM_LOAD_TYPES) { 390 int_value <= Manifest::Type::TYPE_MAX) {
391 global_settings_->allowed_types.push_back( 391 global_settings_->allowed_types.push_back(
392 static_cast<Manifest::Type>(int_value)); 392 static_cast<Manifest::Type>(int_value));
393 } else if (it->GetAsString(&string_value)) { 393 } else if (it->GetAsString(&string_value)) {
394 Manifest::Type manifest_type = 394 Manifest::Type manifest_type =
395 schema_constants::GetManifestType(string_value); 395 schema_constants::GetManifestType(string_value);
396 if (manifest_type != Manifest::TYPE_UNKNOWN) 396 if (manifest_type != Manifest::TYPE_UNKNOWN)
397 global_settings_->allowed_types.push_back(manifest_type); 397 global_settings_->allowed_types.push_back(manifest_type);
398 } 398 }
399 } 399 }
400 } 400 }
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 content::BrowserContext* context) const { 560 content::BrowserContext* context) const {
561 return chrome::GetBrowserContextRedirectedInIncognito(context); 561 return chrome::GetBrowserContextRedirectedInIncognito(context);
562 } 562 }
563 563
564 void ExtensionManagementFactory::RegisterProfilePrefs( 564 void ExtensionManagementFactory::RegisterProfilePrefs(
565 user_prefs::PrefRegistrySyncable* user_prefs) { 565 user_prefs::PrefRegistrySyncable* user_prefs) {
566 user_prefs->RegisterDictionaryPref(pref_names::kExtensionManagement); 566 user_prefs->RegisterDictionaryPref(pref_names::kExtensionManagement);
567 } 567 }
568 568
569 } // namespace extensions 569 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_functional_browsertest.cc ('k') | chrome/browser/extensions/installed_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698