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

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

Issue 345563008: Rename "managed (mode|user)" to "supervised user" (part 4) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/webstore_startup_installer_browsertest.cc » ('j') | 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) 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 "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "base/threading/thread_restrictions.h" 11 #include "base/threading/thread_restrictions.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/extensions/extension_action_manager.h" 14 #include "chrome/browser/extensions/extension_action_manager.h"
15 #include "chrome/browser/extensions/extension_error_reporter.h" 15 #include "chrome/browser/extensions/extension_error_reporter.h"
16 #include "chrome/browser/extensions/extension_service.h" 16 #include "chrome/browser/extensions/extension_service.h"
17 #include "chrome/browser/extensions/extension_util.h" 17 #include "chrome/browser/extensions/extension_util.h"
18 #include "chrome/browser/profiles/profile_manager.h" 18 #include "chrome/browser/profiles/profile_manager.h"
19 #include "chrome/common/chrome_switches.h" 19 #include "chrome/common/chrome_switches.h"
20 #include "chrome/common/extensions/api/managed_mode_private/managed_mode_handler .h" 20 #include "chrome/common/extensions/api/supervised_user_private/supervised_user_h andler.h"
21 #include "chrome/common/extensions/extension_constants.h" 21 #include "chrome/common/extensions/extension_constants.h"
22 #include "chrome/common/extensions/manifest_url_handler.h" 22 #include "chrome/common/extensions/manifest_url_handler.h"
23 #include "chrome/common/pref_names.h" 23 #include "chrome/common/pref_names.h"
24 #include "content/public/browser/notification_service.h" 24 #include "content/public/browser/notification_service.h"
25 #include "content/public/browser/user_metrics.h" 25 #include "content/public/browser/user_metrics.h"
26 #include "extensions/browser/api/runtime/runtime_api.h" 26 #include "extensions/browser/api/runtime/runtime_api.h"
27 #include "extensions/browser/extension_prefs.h" 27 #include "extensions/browser/extension_prefs.h"
28 #include "extensions/browser/extension_registry.h" 28 #include "extensions/browser/extension_registry.h"
29 #include "extensions/browser/extension_system.h" 29 #include "extensions/browser/extension_system.h"
30 #include "extensions/browser/management_policy.h" 30 #include "extensions/browser/management_policy.h"
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 } 429 }
430 break; 430 break;
431 } 431 }
432 432
433 if (extension_action_manager->GetPageAction(*extension)) 433 if (extension_action_manager->GetPageAction(*extension))
434 ++page_action_count; 434 ++page_action_count;
435 435
436 if (extension_action_manager->GetBrowserAction(*extension)) 436 if (extension_action_manager->GetBrowserAction(*extension))
437 ++browser_action_count; 437 ++browser_action_count;
438 438
439 if (ManagedModeInfo::IsContentPack(extension)) 439 if (SupervisedUserInfo::IsContentPack(extension))
440 ++content_pack_count; 440 ++content_pack_count;
441 441
442 RecordCreationFlags(extension); 442 RecordCreationFlags(extension);
443 443
444 ExtensionService::RecordPermissionMessagesHistogram( 444 ExtensionService::RecordPermissionMessagesHistogram(
445 extension, "Extensions.Permissions_Load2"); 445 extension, "Extensions.Permissions_Load2");
446 446
447 // For incognito and file access, skip anything that doesn't appear in 447 // For incognito and file access, skip anything that doesn't appear in
448 // settings. Also, policy-installed (and unpacked of course, checked above) 448 // settings. Also, policy-installed (and unpacked of course, checked above)
449 // extensions are boring. 449 // extensions are boring.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) { 547 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) {
548 int flags = extension_prefs_->GetCreationFlags(info->extension_id); 548 int flags = extension_prefs_->GetCreationFlags(info->extension_id);
549 if (!Manifest::IsUnpackedLocation(info->extension_location)) 549 if (!Manifest::IsUnpackedLocation(info->extension_location))
550 flags |= Extension::REQUIRE_KEY; 550 flags |= Extension::REQUIRE_KEY;
551 if (extension_prefs_->AllowFileAccess(info->extension_id)) 551 if (extension_prefs_->AllowFileAccess(info->extension_id))
552 flags |= Extension::ALLOW_FILE_ACCESS; 552 flags |= Extension::ALLOW_FILE_ACCESS;
553 return flags; 553 return flags;
554 } 554 }
555 555
556 } // namespace extensions 556 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/webstore_startup_installer_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698