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

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

Issue 2771233002: Remove the wrapper functions content::RecordAction et al (Closed)
Patch Set: Rebased Created 3 years, 9 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 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/metrics/histogram_macros.h" 13 #include "base/metrics/histogram_macros.h"
14 #include "base/metrics/sparse_histogram.h" 14 #include "base/metrics/sparse_histogram.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "base/threading/thread_restrictions.h" 16 #include "base/threading/thread_restrictions.h"
17 #include "base/trace_event/trace_event.h" 17 #include "base/trace_event/trace_event.h"
18 #include "base/values.h" 18 #include "base/values.h"
19 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
20 #include "chrome/browser/extensions/extension_error_reporter.h" 20 #include "chrome/browser/extensions/extension_error_reporter.h"
21 #include "chrome/browser/extensions/extension_service.h" 21 #include "chrome/browser/extensions/extension_service.h"
22 #include "chrome/browser/extensions/extension_util.h" 22 #include "chrome/browser/extensions/extension_util.h"
23 #include "chrome/browser/profiles/profile_manager.h" 23 #include "chrome/browser/profiles/profile_manager.h"
24 #include "chrome/common/chrome_switches.h" 24 #include "chrome/common/chrome_switches.h"
25 #include "chrome/common/extensions/chrome_manifest_url_handlers.h" 25 #include "chrome/common/extensions/chrome_manifest_url_handlers.h"
26 #include "content/public/browser/browser_thread.h" 26 #include "content/public/browser/browser_thread.h"
27 #include "content/public/browser/notification_service.h" 27 #include "content/public/browser/notification_service.h"
28 #include "content/public/browser/user_metrics.h"
29 #include "extensions/browser/event_router.h" 28 #include "extensions/browser/event_router.h"
30 #include "extensions/browser/extension_prefs.h" 29 #include "extensions/browser/extension_prefs.h"
31 #include "extensions/browser/extension_registry.h" 30 #include "extensions/browser/extension_registry.h"
32 #include "extensions/browser/extension_system.h" 31 #include "extensions/browser/extension_system.h"
33 #include "extensions/browser/extension_util.h" 32 #include "extensions/browser/extension_util.h"
34 #include "extensions/browser/management_policy.h" 33 #include "extensions/browser/management_policy.h"
35 #include "extensions/common/extension.h" 34 #include "extensions/common/extension.h"
36 #include "extensions/common/extension_l10n_util.h" 35 #include "extensions/common/extension_l10n_util.h"
37 #include "extensions/common/extension_set.h" 36 #include "extensions/common/extension_set.h"
38 #include "extensions/common/extension_urls.h" 37 #include "extensions/common/extension_urls.h"
39 #include "extensions/common/file_util.h" 38 #include "extensions/common/file_util.h"
40 #include "extensions/common/manifest.h" 39 #include "extensions/common/manifest.h"
41 #include "extensions/common/manifest_constants.h" 40 #include "extensions/common/manifest_constants.h"
42 #include "extensions/common/manifest_handlers/background_info.h" 41 #include "extensions/common/manifest_handlers/background_info.h"
43 #include "extensions/common/manifest_url_handlers.h" 42 #include "extensions/common/manifest_url_handlers.h"
44 43
45 using base::UserMetricsAction;
46 using content::BrowserThread; 44 using content::BrowserThread;
47 45
48 namespace extensions { 46 namespace extensions {
49 47
50 namespace errors = manifest_errors; 48 namespace errors = manifest_errors;
51 49
52 namespace { 50 namespace {
53 51
54 // The following enumeration is used in histograms matching 52 // The following enumeration is used in histograms matching
55 // Extensions.ManifestReload*. 53 // Extensions.ManifestReload*.
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) { 624 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) {
627 int flags = extension_prefs_->GetCreationFlags(info->extension_id); 625 int flags = extension_prefs_->GetCreationFlags(info->extension_id);
628 if (!Manifest::IsUnpackedLocation(info->extension_location)) 626 if (!Manifest::IsUnpackedLocation(info->extension_location))
629 flags |= Extension::REQUIRE_KEY; 627 flags |= Extension::REQUIRE_KEY;
630 if (extension_prefs_->AllowFileAccess(info->extension_id)) 628 if (extension_prefs_->AllowFileAccess(info->extension_id))
631 flags |= Extension::ALLOW_FILE_ACCESS; 629 flags |= Extension::ALLOW_FILE_ACCESS;
632 return flags; 630 return flags;
633 } 631 }
634 632
635 } // namespace extensions 633 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_message_bubble_controller.cc ('k') | chrome/browser/first_run/first_run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698