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

Side by Side Diff: chrome/browser/extensions/extension_service.h

Issue 9150016: Move creation and ownership of ResourceDispatcherHost and PluginService to content. This gives a ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 // Adds an ExternalExtensionProviderInterface for the service to use during 503 // Adds an ExternalExtensionProviderInterface for the service to use during
504 // testing. Takes ownership of |test_provider|. 504 // testing. Takes ownership of |test_provider|.
505 void AddProviderForTesting(ExternalExtensionProviderInterface* test_provider); 505 void AddProviderForTesting(ExternalExtensionProviderInterface* test_provider);
506 506
507 // ExternalExtensionProvider::Visitor implementation. 507 // ExternalExtensionProvider::Visitor implementation.
508 virtual void OnExternalExtensionFileFound(const std::string& id, 508 virtual void OnExternalExtensionFileFound(const std::string& id,
509 const Version* version, 509 const Version* version,
510 const FilePath& path, 510 const FilePath& path,
511 Extension::Location location, 511 Extension::Location location,
512 int creation_flags, 512 int creation_flags,
513 bool mark_acknowledged) 513 bool mark_acknowledged) OVERRIDE;
514 OVERRIDE;
515 514
516 virtual void OnExternalExtensionUpdateUrlFound(const std::string& id, 515 virtual void OnExternalExtensionUpdateUrlFound(
517 const GURL& update_url, 516 const std::string& id,
518 Extension::Location location) 517 const GURL& update_url,
519 OVERRIDE; 518 Extension::Location location) OVERRIDE;
520 519
521 virtual void OnExternalProviderReady( 520 virtual void OnExternalProviderReady(
522 const ExternalExtensionProviderInterface* provider) OVERRIDE; 521 const ExternalExtensionProviderInterface* provider) OVERRIDE;
523 522
524 void OnAllExternalProvidersReady(); 523 void OnAllExternalProvidersReady();
525 524
526 // Once all external providers are done, generates any needed alerts about 525 // Once all external providers are done, generates any needed alerts about
527 // extensions. 526 // extensions.
528 void IdentifyAlertableExtensions(); 527 void IdentifyAlertableExtensions();
529 528
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 // Call only from IO thread. 574 // Call only from IO thread.
576 extensions::SocketController* socket_controller(); 575 extensions::SocketController* socket_controller();
577 576
578 // Implement ImageLoadingTracker::Observer. |tracker_| is used to 577 // Implement ImageLoadingTracker::Observer. |tracker_| is used to
579 // load the application's icon, which is done when we start creating an 578 // load the application's icon, which is done when we start creating an
580 // application's shortcuts. This method receives the icon, and completes 579 // application's shortcuts. This method receives the icon, and completes
581 // the process of installing the shortcuts. 580 // the process of installing the shortcuts.
582 virtual void OnImageLoaded(SkBitmap* image, 581 virtual void OnImageLoaded(SkBitmap* image,
583 const ExtensionResource& resource, 582 const ExtensionResource& resource,
584 int index) OVERRIDE; 583 int index) OVERRIDE;
584
585 void set_use_utility_process_for_testing(bool value) {
586 use_utility_process_ = value;
587 }
588
585 private: 589 private:
586 // Bundle of type (app or extension)-specific sync stuff. 590 // Bundle of type (app or extension)-specific sync stuff.
587 struct SyncBundle { 591 struct SyncBundle {
588 SyncBundle(); 592 SyncBundle();
589 ~SyncBundle(); 593 ~SyncBundle();
590 594
591 bool HasExtensionId(const std::string& id) const; 595 bool HasExtensionId(const std::string& id) const;
592 bool HasPendingExtensionId(const std::string& id) const; 596 bool HasPendingExtensionId(const std::string& id) const;
593 597
594 ExtensionFilter filter; 598 ExtensionFilter filter;
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 // We need to control destruction of this object (it needs to happen on the 840 // We need to control destruction of this object (it needs to happen on the
837 // IO thread), so we don't get to use any RAII devices with it. 841 // IO thread), so we don't get to use any RAII devices with it.
838 extensions::SocketController* socket_controller_; 842 extensions::SocketController* socket_controller_;
839 843
840 extensions::ProcessMap process_map_; 844 extensions::ProcessMap process_map_;
841 845
842 // Fields used when installing application shortcuts. 846 // Fields used when installing application shortcuts.
843 ShellIntegration::ShortcutInfo shortcut_info_; 847 ShellIntegration::ShortcutInfo shortcut_info_;
844 ImageLoadingTracker tracker_; 848 ImageLoadingTracker tracker_;
845 849
850 // True if the utility process is used, false otherwise (i.e. for tests).
851 bool use_utility_process_;
852
846 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 853 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
847 InstallAppsWithUnlimtedStorage); 854 InstallAppsWithUnlimtedStorage);
848 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 855 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
849 InstallAppsAndCheckStorageProtection); 856 InstallAppsAndCheckStorageProtection);
850 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 857 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
851 }; 858 };
852 859
853 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 860 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698