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

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

Issue 2054773002: Replace the WAS_INSTALLED_BY_CUSTODIAN creation flag with a pref (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to code review by Devlin Created 4 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 (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/installed_loader.h" 5 #include "chrome/browser/extensions/installed_loader.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 UMA_HISTOGRAM_COUNTS_100("Extensions.EventlessEventPages", 602 UMA_HISTOGRAM_COUNTS_100("Extensions.EventlessEventPages",
603 eventless_event_pages_count); 603 eventless_event_pages_count);
604 } 604 }
605 605
606 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) { 606 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) {
607 int flags = extension_prefs_->GetCreationFlags(info->extension_id); 607 int flags = extension_prefs_->GetCreationFlags(info->extension_id);
608 if (!Manifest::IsUnpackedLocation(info->extension_location)) 608 if (!Manifest::IsUnpackedLocation(info->extension_location))
609 flags |= Extension::REQUIRE_KEY; 609 flags |= Extension::REQUIRE_KEY;
610 if (extension_prefs_->AllowFileAccess(info->extension_id)) 610 if (extension_prefs_->AllowFileAccess(info->extension_id))
611 flags |= Extension::ALLOW_FILE_ACCESS; 611 flags |= Extension::ALLOW_FILE_ACCESS;
612
613 bool installed_by_custodian = util::WasInstalledByCustodian(
614 info->extension_id, extension_service_->profile());
Devlin 2016/06/15 00:30:36 is this git cl formatted?
mamir 2016/06/15 09:54:41 Yes.
615 if (installed_by_custodian)
616 flags |= Extension::WAS_INSTALLED_BY_CUSTODIAN;
617
612 return flags; 618 return flags;
613 } 619 }
614 620
615 } // namespace extensions 621 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698