diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/download/base_file.cc | 1 | ||||
-rw-r--r-- | chrome/common/indexed_db_key.cc | 1 | ||||
-rw-r--r-- | chrome/common/service_process_util.cc | 2 | ||||
-rw-r--r-- | chrome/common/service_process_util.h | 4 | ||||
-rw-r--r-- | chrome/common/service_process_util_mac.mm | 2 | ||||
-rw-r--r-- | chrome/common/service_process_util_posix.cc | 10 | ||||
-rw-r--r-- | chrome/common/service_process_util_posix.h | 4 | ||||
-rw-r--r-- | chrome/common/service_process_util_win.cc | 2 | ||||
-rw-r--r-- | chrome/service/remoting/chromoting_host_manager.cc | 3 |
9 files changed, 18 insertions, 11 deletions
diff --git a/chrome/browser/download/base_file.cc b/chrome/browser/download/base_file.cc index 1fcf278..9229aca 100644 --- a/chrome/browser/download/base_file.cc +++ b/chrome/browser/download/base_file.cc @@ -32,6 +32,7 @@ BaseFile::BaseFile(const FilePath& full_path, power_save_blocker_(true), calculate_hash_(false) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); + memset(sha256_hash_, 0, sizeof(sha256_hash_)); } BaseFile::~BaseFile() { diff --git a/chrome/common/indexed_db_key.cc b/chrome/common/indexed_db_key.cc index 050b941..ad02858 100644 --- a/chrome/common/indexed_db_key.cc +++ b/chrome/common/indexed_db_key.cc @@ -11,6 +11,7 @@ using WebKit::WebIDBKey; IndexedDBKey::IndexedDBKey() : type_(WebIDBKey::InvalidType), + date_(0), number_(0) { } diff --git a/chrome/common/service_process_util.cc b/chrome/common/service_process_util.cc index 8120a28..7ae6c53 100644 --- a/chrome/common/service_process_util.cc +++ b/chrome/common/service_process_util.cc @@ -185,7 +185,7 @@ void ServiceProcessState::SignalStopped() { #if !defined(OS_MACOSX) bool ServiceProcessState::Initialize() { - if (!InitializeState()) { + if (!CreateState()) { return false; } if (!TakeSingletonLock()) { diff --git a/chrome/common/service_process_util.h b/chrome/common/service_process_util.h index 1ec9d65..5db5225 100644 --- a/chrome/common/service_process_util.h +++ b/chrome/common/service_process_util.h @@ -105,8 +105,8 @@ class ServiceProcessState { bool TakeSingletonLock(); #endif // !OS_MACOSX - // Initialize the platform specific state. - bool InitializeState(); + // Creates the platform specific state. + bool CreateState(); // Tear down the platform specific state. void TearDownState(); diff --git a/chrome/common/service_process_util_mac.mm b/chrome/common/service_process_util_mac.mm index 75b4b2a..a956ec8 100644 --- a/chrome/common/service_process_util_mac.mm +++ b/chrome/common/service_process_util_mac.mm @@ -156,7 +156,7 @@ bool GetServiceProcessData(std::string* version, base::ProcessId* pid) { } bool ServiceProcessState::Initialize() { - if (!InitializeState()) { + if (!CreateState()) { return false; } CFErrorRef err = NULL; diff --git a/chrome/common/service_process_util_posix.cc b/chrome/common/service_process_util_posix.cc index 189fd7f..504570b 100644 --- a/chrome/common/service_process_util_posix.cc +++ b/chrome/common/service_process_util_posix.cc @@ -52,7 +52,10 @@ static void SigTermHandler(int sig, siginfo_t* info, void* uap) { } } -ServiceProcessState::StateData::StateData() {} +ServiceProcessState::StateData::StateData() : set_action_(false) { + memset(sockets_, -1, sizeof(sockets_)); + memset(&old_action_, 0, sizeof(old_action_)); +} void ServiceProcessState::StateData::SignalReady() { CHECK(MessageLoopForIO::current()->WatchFileDescriptor( @@ -81,13 +84,10 @@ void ServiceProcessState::StateData::SignalReady() { ServiceProcessState::StateData::~StateData() {} -bool ServiceProcessState::InitializeState() { +bool ServiceProcessState::CreateState() { CHECK(!state_); state_ = new StateData; state_->AddRef(); - state_->sockets_[0] = -1; - state_->sockets_[1] = -1; - state_->set_action_ = false; return true; } diff --git a/chrome/common/service_process_util_posix.h b/chrome/common/service_process_util_posix.h index 42b0a31..c84b3b8 100644 --- a/chrome/common/service_process_util_posix.h +++ b/chrome/common/service_process_util_posix.h @@ -56,6 +56,10 @@ struct ServiceProcessState::StateData // to be monitoring it. void SignalReady(); + + // TODO(jhawkins): Either make this a class or rename these public member + // variables to remove the trailing underscore. + #if defined(OS_MACOSX) base::mac::ScopedCFTypeRef<CFDictionaryRef> launchd_conf_; #endif // OS_MACOSX diff --git a/chrome/common/service_process_util_win.cc b/chrome/common/service_process_util_win.cc index adc5a72..32581a1 100644 --- a/chrome/common/service_process_util_win.cc +++ b/chrome/common/service_process_util_win.cc @@ -103,7 +103,7 @@ struct ServiceProcessState::StateData { scoped_ptr<ServiceProcessShutdownMonitor> shutdown_monitor; }; -bool ServiceProcessState::InitializeState() { +bool ServiceProcessState::CreateState() { DCHECK(!state_); state_ = new StateData; return true; diff --git a/chrome/service/remoting/chromoting_host_manager.cc b/chrome/service/remoting/chromoting_host_manager.cc index b24eb4b..12b2adc 100644 --- a/chrome/service/remoting/chromoting_host_manager.cc +++ b/chrome/service/remoting/chromoting_host_manager.cc @@ -16,7 +16,8 @@ namespace remoting { ChromotingHostManager::ChromotingHostManager(Observer* observer) - : observer_(observer) { + : observer_(observer), + main_message_loop_(NULL) { } void ChromotingHostManager::Initialize( |