summaryrefslogtreecommitdiffstats
path: root/components/component_updater/component_updater_service.h
diff options
context:
space:
mode:
authorvasilii <vasilii@chromium.org>2015-04-14 01:59:12 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-14 08:59:44 +0000
commitbc47245d8ae9d6b75dd5f4b4cd17613fd9a5438b (patch)
tree8c240165607918feb373532edb5c7d1a356e119d /components/component_updater/component_updater_service.h
parent2ff69ba324f7f3f9413fca5db954510ba00ba69a (diff)
downloadchromium_src-bc47245d8ae9d6b75dd5f4b4cd17613fd9a5438b.zip
chromium_src-bc47245d8ae9d6b75dd5f4b4cd17613fd9a5438b.tar.gz
chromium_src-bc47245d8ae9d6b75dd5f4b4cd17613fd9a5438b.tar.bz2
Revert of Implement common code for component and extension updaters. (patchset #3 id:40001 of https://codereview.chromium.org/1055903003/)
Reason for revert: Performance regression: chrome-si/initializers (14.29%) http://build.chromium.org/p/chromium/builders/Linux%20x64/builds/1504/steps/sizes/logs/stdio # Static initializers in src/out/Release/chrome: # HINT: To get this list, run tools/linux/dump-static-initializers.py # HINT: diff against the log from the last run to see what changed # atomicops_internals_x86.cc .L.str # atomicops_internals_x86.cc _GLOBAL__sub_I_atomicops_internals_x86.cc+0x78 # atomicops_internals_x86.cc _GLOBAL__sub_I_atomicops_internals_x86.cc+0xed # atomicops_internals_x86.cc (anonymous namespace)::google_initializer_module_atomicops_x86 # atomicops_internals_x86.cc GoogleInitializer::~GoogleInitializer() # atomicops_internals_x86.cc __cxa_atexit@plt [registers a dtor to run at exit] # atomicops_internals_x86.cc __init_array_end+0x3250 # atomicops_internals_x86.cc __init_array_end+0x34f0 # atomicops_internals_x86.cc __stack_chk_fail@plt # atomicops_internals_x86.cc strcmp@plt # atomicops_internals_x86_gcc.cc .L.str # atomicops_internals_x86_gcc.cc _GLOBAL__sub_I_atomicops_internals_x86_gcc.cc+0x69 # atomicops_internals_x86_gcc.cc _GLOBAL__sub_I_atomicops_internals_x86_gcc.cc+0xb5 # atomicops_internals_x86_gcc.cc google::protobuf::internal::AtomicOps_Internalx86CPUFeatures # atomicops_internals_x86_gcc.cc google::protobuf::internal::AtomicOps_Internalx86CPUFeatures+0x1 # atomicops_internals_x86_gcc.cc __stack_chk_fail@plt # atomicops_internals_x86_gcc.cc strcmp@plt # atomicops_internals_x86_gcc.cc .L.str # atomicops_internals_x86_gcc.cc _GLOBAL__sub_I_atomicops_internals_x86_gcc.cc+0x62 # atomicops_internals_x86_gcc.cc _GLOBAL__sub_I_atomicops_internals_x86_gcc.cc+0x9e # atomicops_internals_x86_gcc.cc v8::base::AtomicOps_Internalx86CPUFeatures # atomicops_internals_x86_gcc.cc __stack_chk_fail@plt # atomicops_internals_x86_gcc.cc strcmp@plt # component_updater_service.cc std::ios_base::Init::Init()@plt # component_updater_service.cc std::__ioinit [#includes <iostream>, use <ostream> instead] # component_updater_service.cc __cxa_atexit@plt [registers a dtor to run at exit] # component_updater_service.cc __init_array_end+0x34f0 # component_updater_service.cc __init_array_end+0x4608 # debugallocation_shim.cc module_enter_exit_hook # debugallocation_shim.cc (anonymous namespace)::large_alloc_threshold # debugallocation_shim.cc TCMallocGuard::TCMallocGuard() # debugallocation_shim.cc __cxa_atexit@plt [registers a dtor to run at exit] # debugallocation_shim.cc __init_array_end+0x34e8 # debugallocation_shim.cc __init_array_end+0x34f0 # debugallocation_shim.cc __init_array_end+0x34f8 # memory_region_map.cc libpthread_initialized # spinlock.cc _GLOBAL__sub_I_spinlock.cc+0x12 # spinlock.cc NumCPUs() # spinlock.cc adaptive_spin_count # spinlock_internal.cc _GLOBAL__sub_I_spinlock_internal.cc+0x79 # spinlock_internal.cc have_futex # spinlock_internal.cc futex_private_flag # spinlock_internal.cc syscall@plt # Found 43 static initializers in 8 files. Original issue's description: > Implement common code for component and extension updaters. > > The changes not under update_client are mechanical. > > This change creates a working UpdateClient updater client, which can be reused by both component and extension updaters. > > This code is not hooked up yet with any of the updaters above. > Those changes will be committed in the near future by other CLs. > > R=waffles,erikwright,agl,dgarrett,jhawkins,brettw > > BUG=450337 > > Committed: https://crrev.com/ba6742df55de47568e3aa438378d844a7439c391 > Cr-Commit-Position: refs/heads/master@{#325006} TBR=agl@chromium.org,dgarrett@chromium.org,erikwright@chromium.org,waffles@chromium.org,dgarrett@google.com,jhawkins@chromium.org,brettw@chromium.org,wfh@chromium.org,sorin@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=450337 Review URL: https://codereview.chromium.org/1085643003 Cr-Commit-Position: refs/heads/master@{#325015}
Diffstat (limited to 'components/component_updater/component_updater_service.h')
-rw-r--r--components/component_updater/component_updater_service.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/components/component_updater/component_updater_service.h b/components/component_updater/component_updater_service.h
index 6871993..ac60a7f 100644
--- a/components/component_updater/component_updater_service.h
+++ b/components/component_updater/component_updater_service.h
@@ -6,15 +6,12 @@
#define COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_
#include <stdint.h>
-
-#include <iosfwd>
#include <string>
#include <vector>
#include "base/callback_forward.h"
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/version.h"
#include "url/gurl.h"
@@ -64,14 +61,14 @@ class OnDemandUpdater;
// All methods are safe to call ONLY from the browser's main thread.
class ComponentUpdateService {
public:
- enum class Status { kOk, kReplaced, kInProgress, kError };
+ enum Status { kOk, kReplaced, kInProgress, kError };
// Defines an interface to observe ComponentUpdateService. It provides
// notifications when state changes occur for the service or for the
// registered components.
class Observer {
public:
- enum class Events {
+ enum Events {
// Sent when the component updater starts doing update checks.
COMPONENT_UPDATER_STARTED,
@@ -172,9 +169,7 @@ class ComponentUpdateService {
friend class ::ComponentsUI;
};
-using ServiceObserver = ComponentUpdateService::Observer;
-std::ostream& operator<<(std::ostream& os,
- const ComponentUpdateService::Status& status);
+typedef ComponentUpdateService::Observer ServiceObserver;
class OnDemandUpdater {
public:
@@ -195,9 +190,10 @@ class OnDemandUpdater {
const std::string& component_id) = 0;
};
-// Creates the component updater.
-scoped_ptr<ComponentUpdateService> ComponentUpdateServiceFactory(
- const scoped_refptr<update_client::Configurator>& config);
+// Creates the component updater. You must pass a valid |config| allocated on
+// the heap which the component updater will own.
+ComponentUpdateService* ComponentUpdateServiceFactory(
+ update_client::Configurator* config);
} // namespace component_updater