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

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

Issue 386733002: Only build extensions code in chrome/browser/ui when extensions are enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/profiles/off_the_record_profile_impl.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 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_system_impl.h" 5 #include "chrome/browser/extensions/extension_system_impl.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 12 matching lines...) Expand all
23 #include "chrome/browser/extensions/extension_warning_badge_service.h" 23 #include "chrome/browser/extensions/extension_warning_badge_service.h"
24 #include "chrome/browser/extensions/extension_warning_set.h" 24 #include "chrome/browser/extensions/extension_warning_set.h"
25 #include "chrome/browser/extensions/install_verifier.h" 25 #include "chrome/browser/extensions/install_verifier.h"
26 #include "chrome/browser/extensions/navigation_observer.h" 26 #include "chrome/browser/extensions/navigation_observer.h"
27 #include "chrome/browser/extensions/shared_module_service.h" 27 #include "chrome/browser/extensions/shared_module_service.h"
28 #include "chrome/browser/extensions/standard_management_policy_provider.h" 28 #include "chrome/browser/extensions/standard_management_policy_provider.h"
29 #include "chrome/browser/extensions/updater/manifest_fetch_data.h" 29 #include "chrome/browser/extensions/updater/manifest_fetch_data.h"
30 #include "chrome/browser/extensions/user_script_master.h" 30 #include "chrome/browser/extensions/user_script_master.h"
31 #include "chrome/browser/profiles/profile.h" 31 #include "chrome/browser/profiles/profile.h"
32 #include "chrome/browser/profiles/profile_manager.h" 32 #include "chrome/browser/profiles/profile_manager.h"
33 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
34 #include "chrome/common/chrome_switches.h" 33 #include "chrome/common/chrome_switches.h"
35 #include "chrome/common/chrome_version_info.h" 34 #include "chrome/common/chrome_version_info.h"
36 #include "chrome/common/extensions/extension_constants.h" 35 #include "chrome/common/extensions/extension_constants.h"
37 #include "chrome/common/extensions/extension_file_util.h" 36 #include "chrome/common/extensions/extension_file_util.h"
38 #include "chrome/common/extensions/features/feature_channel.h" 37 #include "chrome/common/extensions/features/feature_channel.h"
39 #include "chrome/common/extensions/manifest_url_handler.h" 38 #include "chrome/common/extensions/manifest_url_handler.h"
40 #include "content/public/browser/browser_thread.h" 39 #include "content/public/browser/browser_thread.h"
41 #include "content/public/browser/url_data_source.h" 40 #include "content/public/browser/url_data_source.h"
42 #include "extensions/browser/content_verifier.h" 41 #include "extensions/browser/content_verifier.h"
43 #include "extensions/browser/content_verifier_delegate.h" 42 #include "extensions/browser/content_verifier_delegate.h"
(...skipping 10 matching lines...) Expand all
54 #include "extensions/browser/quota_service.h" 53 #include "extensions/browser/quota_service.h"
55 #include "extensions/browser/runtime_data.h" 54 #include "extensions/browser/runtime_data.h"
56 #include "extensions/browser/state_store.h" 55 #include "extensions/browser/state_store.h"
57 #include "extensions/common/constants.h" 56 #include "extensions/common/constants.h"
58 #include "extensions/common/extension.h" 57 #include "extensions/common/extension.h"
59 #include "extensions/common/manifest.h" 58 #include "extensions/common/manifest.h"
60 #include "net/base/escape.h" 59 #include "net/base/escape.h"
61 60
62 #if defined(ENABLE_EXTENSIONS) 61 #if defined(ENABLE_EXTENSIONS)
63 #include "chrome/browser/extensions/unpacked_installer.h" 62 #include "chrome/browser/extensions/unpacked_installer.h"
63 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
64 #endif 64 #endif
65 65
66 #if defined(ENABLE_NOTIFICATIONS) 66 #if defined(ENABLE_NOTIFICATIONS)
67 #include "chrome/browser/notifications/desktop_notification_service.h" 67 #include "chrome/browser/notifications/desktop_notification_service.h"
68 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 68 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
69 #include "ui/message_center/notifier_settings.h" 69 #include "ui/message_center/notifier_settings.h"
70 #endif 70 #endif
71 71
72 #if defined(OS_CHROMEOS) 72 #if defined(OS_CHROMEOS)
73 #include "chrome/browser/app_mode/app_mode_utils.h" 73 #include "chrome/browser/app_mode/app_mode_utils.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 // Load the component extension manifest synchronously. 357 // Load the component extension manifest synchronously.
358 // Blocking the UI thread is acceptable here since 358 // Blocking the UI thread is acceptable here since
359 // this flag designated for developers. 359 // this flag designated for developers.
360 base::ThreadRestrictions::ScopedAllowIO allow_io; 360 base::ThreadRestrictions::ScopedAllowIO allow_io;
361 extension_service_->component_loader()->AddOrReplace( 361 extension_service_->component_loader()->AddOrReplace(
362 base::FilePath(t.token())); 362 base::FilePath(t.token()));
363 } 363 }
364 } 364 }
365 extension_service_->Init(); 365 extension_service_->Init();
366 366
367 #if defined(ENABLE_EXTENSIONS)
367 // Make the chrome://extension-icon/ resource available. 368 // Make the chrome://extension-icon/ resource available.
368 content::URLDataSource::Add(profile_, new ExtensionIconSource(profile_)); 369 content::URLDataSource::Add(profile_, new ExtensionIconSource(profile_));
370 #endif
369 371
370 extension_warning_service_.reset(new ExtensionWarningService(profile_)); 372 extension_warning_service_.reset(new ExtensionWarningService(profile_));
371 extension_warning_badge_service_.reset( 373 extension_warning_badge_service_.reset(
372 new ExtensionWarningBadgeService(profile_)); 374 new ExtensionWarningBadgeService(profile_));
373 extension_warning_service_->AddObserver( 375 extension_warning_service_->AddObserver(
374 extension_warning_badge_service_.get()); 376 extension_warning_badge_service_.get());
375 error_console_.reset(new ErrorConsole(profile_)); 377 error_console_.reset(new ErrorConsole(profile_));
376 quota_service_.reset(new QuotaService); 378 quota_service_.reset(new QuotaService);
377 379
378 // TODO(thestig): Remove this once ExtensionSystemImpl is no longer built on 380 // TODO(thestig): Remove this once ExtensionSystemImpl is no longer built on
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( 612 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts(
611 const std::string& extension_id, 613 const std::string& extension_id,
612 const UnloadedExtensionInfo::Reason reason) { 614 const UnloadedExtensionInfo::Reason reason) {
613 BrowserThread::PostTask( 615 BrowserThread::PostTask(
614 BrowserThread::IO, 616 BrowserThread::IO,
615 FROM_HERE, 617 FROM_HERE,
616 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); 618 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason));
617 } 619 }
618 620
619 } // namespace extensions 621 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/off_the_record_profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698