diff options
Diffstat (limited to 'chrome/browser')
23 files changed, 87 insertions, 236 deletions
diff --git a/chrome/browser/debugger/devtools_remote_message.cc b/chrome/browser/debugger/devtools_remote_message.cc index 6d82a28..eb63009 100644 --- a/chrome/browser/debugger/devtools_remote_message.cc +++ b/chrome/browser/debugger/devtools_remote_message.cc @@ -17,16 +17,6 @@ DevToolsRemoteMessageBuilder& DevToolsRemoteMessageBuilder::instance() { return instance_; } -DevToolsRemoteMessage::DevToolsRemoteMessage() {} - -DevToolsRemoteMessage::DevToolsRemoteMessage(const HeaderMap& headers, - const std::string& content) - : header_map_(headers), - content_(content) { -} - -DevToolsRemoteMessage::~DevToolsRemoteMessage() {} - const std::string DevToolsRemoteMessage::GetHeader( const std::string& header_name, const std::string& default_value) const { diff --git a/chrome/browser/debugger/devtools_remote_message.h b/chrome/browser/debugger/devtools_remote_message.h index e836164..bea9ae5 100644 --- a/chrome/browser/debugger/devtools_remote_message.h +++ b/chrome/browser/debugger/devtools_remote_message.h @@ -35,9 +35,11 @@ class DevToolsRemoteMessage { static const char kEmptyValue[]; // Constructs an empty message with no content or headers. - DevToolsRemoteMessage(); - DevToolsRemoteMessage(const HeaderMap& headers, const std::string& content); - virtual ~DevToolsRemoteMessage(); + DevToolsRemoteMessage() {} + DevToolsRemoteMessage(const HeaderMap& headers, const std::string& content) + : header_map_(headers), + content_(content) {} + virtual ~DevToolsRemoteMessage() {} const HeaderMap& headers() const { return header_map_; diff --git a/chrome/browser/debugger/inspectable_tab_proxy.cc b/chrome/browser/debugger/inspectable_tab_proxy.cc index ce8fd7f..96d4e3e 100644 --- a/chrome/browser/debugger/inspectable_tab_proxy.cc +++ b/chrome/browser/debugger/inspectable_tab_proxy.cc @@ -15,18 +15,6 @@ #include "chrome/browser/tabs/tab_strip_model.h" #include "chrome/common/devtools_messages.h" -DevToolsClientHostImpl::DevToolsClientHostImpl( - int32 id, - DebuggerRemoteService* service, - InspectableTabProxy::IdToClientHostMap* map) - : id_(id), - service_(service), - map_(map) {} - -DevToolsClientHostImpl::~DevToolsClientHostImpl() { - map_->erase(this->id_); -} - // The debugged tab has closed. void DevToolsClientHostImpl::InspectedTabClosing() { TabClosed(); @@ -61,10 +49,6 @@ void DevToolsClientHostImpl::TabClosed() { service_->TabClosed(id_); } -InspectableTabProxy::InspectableTabProxy() {} - -InspectableTabProxy::~InspectableTabProxy() {} - const InspectableTabProxy::ControllersMap& InspectableTabProxy::controllers_map() { controllers_map_.clear(); diff --git a/chrome/browser/debugger/inspectable_tab_proxy.h b/chrome/browser/debugger/inspectable_tab_proxy.h index 8d02727..af08232 100644 --- a/chrome/browser/debugger/inspectable_tab_proxy.h +++ b/chrome/browser/debugger/inspectable_tab_proxy.h @@ -26,8 +26,8 @@ class InspectableTabProxy { typedef base::hash_map<int32, NavigationController*> ControllersMap; typedef base::hash_map<int32, DevToolsClientHostImpl*> IdToClientHostMap; - InspectableTabProxy(); - virtual ~InspectableTabProxy(); + InspectableTabProxy() {} + virtual ~InspectableTabProxy() {} // Returns a map of NavigationControllerKeys to NavigationControllers // for all Browser instances. Clients should not keep the result around @@ -64,9 +64,13 @@ class DevToolsClientHostImpl : public DevToolsClientHost { DevToolsClientHostImpl( int32 id, DebuggerRemoteService* service, - InspectableTabProxy::IdToClientHostMap* map); - ~DevToolsClientHostImpl(); - + InspectableTabProxy::IdToClientHostMap* map) + : id_(id), + service_(service), + map_(map) {} + ~DevToolsClientHostImpl() { + map_->erase(this->id_); + } DebuggerRemoteService* debugger_remote_service() { return service_; } diff --git a/chrome/browser/sync/engine/model_safe_worker.cc b/chrome/browser/sync/engine/model_safe_worker.cc index c488e3b..3f3ddb4 100644 --- a/chrome/browser/sync/engine/model_safe_worker.cc +++ b/chrome/browser/sync/engine/model_safe_worker.cc @@ -38,21 +38,4 @@ std::string ModelSafeGroupToString(ModelSafeGroup group) { } } -ModelSafeWorker::ModelSafeWorker() {} - -ModelSafeWorker::~ModelSafeWorker() {} - -void ModelSafeWorker::DoWorkAndWaitUntilDone(Callback0::Type* work) { - work->Run(); // For GROUP_PASSIVE, we do the work on the current thread. -} - -ModelSafeGroup ModelSafeWorker::GetModelSafeGroup() { - return GROUP_PASSIVE; -} - -bool ModelSafeWorker::CurrentThreadIsWorkThread() { - // The passive group is not the work thread for any browser model. - return false; -} - } // namespace browser_sync diff --git a/chrome/browser/sync/engine/model_safe_worker.h b/chrome/browser/sync/engine/model_safe_worker.h index 9f31c67..4164ff5 100644 --- a/chrome/browser/sync/engine/model_safe_worker.h +++ b/chrome/browser/sync/engine/model_safe_worker.h @@ -41,21 +41,28 @@ std::string ModelSafeGroupToString(ModelSafeGroup group); // syncable::Directory due to a race. class ModelSafeWorker : public base::RefCountedThreadSafe<ModelSafeWorker> { public: - ModelSafeWorker(); - virtual ~ModelSafeWorker(); + ModelSafeWorker() { } + virtual ~ModelSafeWorker() { } // Any time the Syncer performs model modifications (e.g employing a // WriteTransaction), it should be done by this method to ensure it is done // from a model-safe thread. - virtual void DoWorkAndWaitUntilDone(Callback0::Type* work); + virtual void DoWorkAndWaitUntilDone(Callback0::Type* work) { + work->Run(); // For GROUP_PASSIVE, we do the work on the current thread. + } - virtual ModelSafeGroup GetModelSafeGroup(); + virtual ModelSafeGroup GetModelSafeGroup() { + return GROUP_PASSIVE; + } // Check the current thread and see if it's the thread associated with // this worker. If this returns true, then it should be safe to operate // on models that are in this worker's group. If this returns false, // such work should not be attempted. - virtual bool CurrentThreadIsWorkThread(); + virtual bool CurrentThreadIsWorkThread() { + // The passive group is not the work thread for any browser model. + return false; + } private: friend class base::RefCountedThreadSafe<ModelSafeWorker>; diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc index f91d0f8..4728534 100644 --- a/chrome/browser/sync/engine/syncapi.cc +++ b/chrome/browser/sync/engine/syncapi.cc @@ -24,7 +24,6 @@ #include "base/task.h" #include "base/utf_string_conversions.h" #include "chrome/browser/browser_process.h" -#include "chrome/browser/chrome_thread.h" #include "chrome/browser/sync/sync_constants.h" #include "chrome/browser/sync/engine/all_status.h" #include "chrome/browser/sync/engine/change_reorder_buffer.h" diff --git a/chrome/browser/sync/sessions/ordered_commit_set.cc b/chrome/browser/sync/sessions/ordered_commit_set.cc index d700494..104bafb 100644 --- a/chrome/browser/sync/sessions/ordered_commit_set.cc +++ b/chrome/browser/sync/sessions/ordered_commit_set.cc @@ -11,13 +11,6 @@ namespace browser_sync { namespace sessions { -OrderedCommitSet::OrderedCommitSet( - const browser_sync::ModelSafeRoutingInfo& routes) - : routes_(routes) { -} - -OrderedCommitSet::~OrderedCommitSet() {} - void OrderedCommitSet::AddCommitItem(const int64 metahandle, const syncable::Id& commit_id, syncable::ModelType type) { diff --git a/chrome/browser/sync/sessions/ordered_commit_set.h b/chrome/browser/sync/sessions/ordered_commit_set.h index bce2246..50f3e97 100644 --- a/chrome/browser/sync/sessions/ordered_commit_set.h +++ b/chrome/browser/sync/sessions/ordered_commit_set.h @@ -30,8 +30,10 @@ class OrderedCommitSet { typedef std::vector<size_t> Projection; // TODO(chron): Reserve space according to batch size? - explicit OrderedCommitSet(const browser_sync::ModelSafeRoutingInfo& routes); - ~OrderedCommitSet(); + explicit OrderedCommitSet(const browser_sync::ModelSafeRoutingInfo& routes) + : routes_(routes) {} + + ~OrderedCommitSet() {} bool HaveCommitItem(const int64 metahandle) const { return inserted_metahandles_.count(metahandle) > 0; diff --git a/chrome/browser/sync/sessions/session_state.cc b/chrome/browser/sync/sessions/session_state.cc index 644d2f6..f28a7dc 100644 --- a/chrome/browser/sync/sessions/session_state.cc +++ b/chrome/browser/sync/sessions/session_state.cc @@ -13,39 +13,6 @@ using std::vector; namespace browser_sync { namespace sessions { -SyncSessionSnapshot::SyncSessionSnapshot( - const SyncerStatus& syncer_status, - const ErrorCounters& errors, - int64 num_server_changes_remaining, - int64 max_local_timestamp, - bool is_share_usable, - const syncable::ModelTypeBitSet& initial_sync_ended, - bool more_to_sync, - bool is_silenced, - int64 unsynced_count, - int num_conflicting_updates, - bool did_commit_items) - : syncer_status(syncer_status), - errors(errors), - num_server_changes_remaining(num_server_changes_remaining), - max_local_timestamp(max_local_timestamp), - is_share_usable(is_share_usable), - initial_sync_ended(initial_sync_ended), - has_more_to_sync(more_to_sync), - is_silenced(is_silenced), - unsynced_count(unsynced_count), - num_conflicting_updates(num_conflicting_updates), - did_commit_items(did_commit_items) { -} - -SyncSessionSnapshot::~SyncSessionSnapshot() {} - -ConflictProgress::ConflictProgress(bool* dirty_flag) : dirty_(dirty_flag) {} - -ConflictProgress::~ConflictProgress() { - CleanupSets(); -} - IdToConflictSetMap::const_iterator ConflictProgress::IdToConflictSetFind( const syncable::Id& the_id) const { return id_to_conflict_set_.find(the_id); @@ -164,10 +131,6 @@ void ConflictProgress::CleanupSets() { id_to_conflict_set_.clear(); } -UpdateProgress::UpdateProgress() {} - -UpdateProgress::~UpdateProgress() {} - void UpdateProgress::AddVerifyResult(const VerifyResult& verify_result, const sync_pb::SyncEntity& entity) { verified_updates_.push_back(std::make_pair(verify_result, entity)); @@ -221,29 +184,5 @@ bool UpdateProgress::HasConflictingUpdates() const { return false; } -AllModelTypeState::AllModelTypeState(bool* dirty_flag) - : unsynced_handles(dirty_flag), - syncer_status(dirty_flag), - error_counters(dirty_flag), - num_server_changes_remaining(dirty_flag, 0), - commit_set(ModelSafeRoutingInfo()) { -} - -AllModelTypeState::~AllModelTypeState() {} - -PerModelSafeGroupState::PerModelSafeGroupState(bool* dirty_flag) - : conflict_progress(dirty_flag) { -} - -PerModelSafeGroupState::~PerModelSafeGroupState() { -} - -PerModelTypeState::PerModelTypeState(bool* dirty_flag) - : current_download_timestamp(dirty_flag, 0) { -} - -PerModelTypeState::~PerModelTypeState() { -} - } // namespace sessions } // namespace browser_sync diff --git a/chrome/browser/sync/sessions/session_state.h b/chrome/browser/sync/sessions/session_state.h index c345fb4..3f1e721 100644 --- a/chrome/browser/sync/sessions/session_state.h +++ b/chrome/browser/sync/sessions/session_state.h @@ -80,9 +80,18 @@ struct SyncSessionSnapshot { bool is_silenced, int64 unsynced_count, int num_conflicting_updates, - bool did_commit_items); - ~SyncSessionSnapshot(); - + bool did_commit_items) + : syncer_status(syncer_status), + errors(errors), + num_server_changes_remaining(num_server_changes_remaining), + max_local_timestamp(max_local_timestamp), + is_share_usable(is_share_usable), + initial_sync_ended(initial_sync_ended), + has_more_to_sync(more_to_sync), + is_silenced(is_silenced), + unsynced_count(unsynced_count), + num_conflicting_updates(num_conflicting_updates), + did_commit_items(did_commit_items) {} const SyncerStatus syncer_status; const ErrorCounters errors; const int64 num_server_changes_remaining; @@ -99,8 +108,8 @@ struct SyncSessionSnapshot { // Tracks progress of conflicts and their resolution using conflict sets. class ConflictProgress { public: - explicit ConflictProgress(bool* dirty_flag); - ~ConflictProgress(); + explicit ConflictProgress(bool* dirty_flag) : dirty_(dirty_flag) {} + ~ConflictProgress() { CleanupSets(); } // Various iterators, size, and retrieval functions for conflict sets. IdToConflictSetMap::const_iterator IdToConflictSetBegin() const; IdToConflictSetMap::const_iterator IdToConflictSetEnd() const; @@ -141,9 +150,6 @@ typedef std::pair<UpdateAttemptResponse, syncable::Id> AppliedUpdate; // Tracks update application and verification. class UpdateProgress { public: - UpdateProgress(); - ~UpdateProgress(); - void AddVerifyResult(const VerifyResult& verify_result, const sync_pb::SyncEntity& entity); @@ -226,9 +232,12 @@ class DirtyOnWrite { // scope control (such as OrderedCommitSet), but the top level entity is still // a singleton with respect to model types. struct AllModelTypeState { - explicit AllModelTypeState(bool* dirty_flag); - ~AllModelTypeState(); - + explicit AllModelTypeState(bool* dirty_flag) + : unsynced_handles(dirty_flag), + syncer_status(dirty_flag), + error_counters(dirty_flag), + num_server_changes_remaining(dirty_flag, 0), + commit_set(ModelSafeRoutingInfo()) {} // Commits for all model types are bundled together into a single message. ClientToServerMessage commit_message; ClientToServerResponse commit_response; @@ -247,18 +256,16 @@ struct AllModelTypeState { // Grouping of all state that applies to a single ModelSafeGroup. struct PerModelSafeGroupState { - explicit PerModelSafeGroupState(bool* dirty_flag); - ~PerModelSafeGroupState(); - + explicit PerModelSafeGroupState(bool* dirty_flag) + : conflict_progress(dirty_flag) {} UpdateProgress update_progress; ConflictProgress conflict_progress; }; // Grouping of all state that applies to a single ModelType. struct PerModelTypeState { - explicit PerModelTypeState(bool* dirty_flag); - ~PerModelTypeState(); - + explicit PerModelTypeState(bool* dirty_flag) + : current_download_timestamp(dirty_flag, 0) {} DirtyOnWrite<int64> current_download_timestamp; }; diff --git a/chrome/browser/sync/sessions/status_controller.cc b/chrome/browser/sync/sessions/status_controller.cc index f7e159c..21159d8 100644 --- a/chrome/browser/sync/sessions/status_controller.cc +++ b/chrome/browser/sync/sessions/status_controller.cc @@ -23,8 +23,6 @@ StatusController::StatusController(const ModelSafeRoutingInfo& routes) routing_info_(routes) { } -StatusController::~StatusController() {} - bool StatusController::TestAndClearIsDirty() { bool is_dirty = is_dirty_; is_dirty_ = false; diff --git a/chrome/browser/sync/sessions/status_controller.h b/chrome/browser/sync/sessions/status_controller.h index d038ed5..f367b50 100644 --- a/chrome/browser/sync/sessions/status_controller.h +++ b/chrome/browser/sync/sessions/status_controller.h @@ -45,7 +45,6 @@ namespace sessions { class StatusController { public: explicit StatusController(const ModelSafeRoutingInfo& routes); - ~StatusController(); // Returns true if some portion of the session state has changed (is dirty) // since it was created or was last reset. diff --git a/chrome/browser/sync/sessions/sync_session.cc b/chrome/browser/sync/sessions/sync_session.cc index a861b2c..8e5064c 100644 --- a/chrome/browser/sync/sessions/sync_session.cc +++ b/chrome/browser/sync/sessions/sync_session.cc @@ -22,8 +22,6 @@ SyncSession::SyncSession(SyncSessionContext* context, Delegate* delegate) status_controller_.reset(new StatusController(routing_info_)); } -SyncSession::~SyncSession() {} - SyncSessionSnapshot SyncSession::TakeSnapshot() const { syncable::ScopedDirLookup dir(context_->directory_manager(), context_->account_name()); diff --git a/chrome/browser/sync/sessions/sync_session.h b/chrome/browser/sync/sessions/sync_session.h index 568c1f4..d3320ca 100644 --- a/chrome/browser/sync/sessions/sync_session.h +++ b/chrome/browser/sync/sessions/sync_session.h @@ -77,7 +77,6 @@ class SyncSession { // Creates a new SyncSession with mandatory context and delegate. SyncSession(SyncSessionContext* context, Delegate* delegate); - ~SyncSession(); // Builds a thread-safe and read-only copy of the current session state. SyncSessionSnapshot TakeSnapshot() const; diff --git a/chrome/browser/sync/sessions/sync_session_context.cc b/chrome/browser/sync/sessions/sync_session_context.cc deleted file mode 100644 index 7b69568..0000000 --- a/chrome/browser/sync/sessions/sync_session_context.cc +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/sync/sessions/sync_session_context.h" - -#include "chrome/browser/chrome_thread.h" -#include "chrome/browser/sync/util/extensions_activity_monitor.h" -#include "chrome/browser/sync/sessions/session_state.h" - -namespace browser_sync { -namespace sessions { - -SyncSessionContext::SyncSessionContext( - ServerConnectionManager* connection_manager, - syncable::DirectoryManager* directory_manager, - ModelSafeWorkerRegistrar* model_safe_worker_registrar) - : resolver_(NULL), - syncer_event_channel_(NULL), - connection_manager_(connection_manager), - directory_manager_(directory_manager), - registrar_(model_safe_worker_registrar), - extensions_activity_monitor_(new ExtensionsActivityMonitor()), - notifications_enabled_(false) { -} - -SyncSessionContext::~SyncSessionContext() { - // In unittests, there may be no UI thread, so the above will fail. - if (!ChromeThread::DeleteSoon(ChromeThread::UI, FROM_HERE, - extensions_activity_monitor_)) { - delete extensions_activity_monitor_; - } -} - -void SyncSessionContext::set_last_snapshot( - const SyncSessionSnapshot& snapshot) { - previous_session_snapshot_.reset(new SyncSessionSnapshot(snapshot)); -} - -} // namespace sessions -} // namespace browser_sync diff --git a/chrome/browser/sync/sessions/sync_session_context.h b/chrome/browser/sync/sessions/sync_session_context.h index b782876..4c6b63f 100644 --- a/chrome/browser/sync/sessions/sync_session_context.h +++ b/chrome/browser/sync/sessions/sync_session_context.h @@ -20,10 +20,10 @@ #pragma once #include <string> - -#include "base/scoped_ptr.h" +#include "chrome/browser/chrome_thread.h" #include "chrome/browser/sync/engine/model_safe_worker.h" #include "chrome/browser/sync/engine/syncer_types.h" +#include "chrome/browser/sync/util/extensions_activity_monitor.h" namespace syncable { class DirectoryManager; @@ -32,21 +32,34 @@ class DirectoryManager; namespace browser_sync { class ConflictResolver; -class ExtensionsActivityMonitor; class ModelSafeWorkerRegistrar; class ServerConnectionManager; namespace sessions { class ScopedSessionContextConflictResolver; class ScopedSessionContextSyncerEventChannel; -struct SyncSessionSnapshot; class SyncSessionContext { public: SyncSessionContext(ServerConnectionManager* connection_manager, syncable::DirectoryManager* directory_manager, - ModelSafeWorkerRegistrar* model_safe_worker_registrar); - ~SyncSessionContext(); + ModelSafeWorkerRegistrar* model_safe_worker_registrar) + : resolver_(NULL), + syncer_event_channel_(NULL), + connection_manager_(connection_manager), + directory_manager_(directory_manager), + registrar_(model_safe_worker_registrar), + extensions_activity_monitor_(new ExtensionsActivityMonitor()), + notifications_enabled_(false) { + } + + ~SyncSessionContext() { + // In unittests, there may be no UI thread, so the above will fail. + if (!ChromeThread::DeleteSoon(ChromeThread::UI, FROM_HERE, + extensions_activity_monitor_)) { + delete extensions_activity_monitor_; + } + } ConflictResolver* resolver() { return resolver_; } ServerConnectionManager* connection_manager() { @@ -90,7 +103,9 @@ class SyncSessionContext { return previous_session_snapshot_.get(); } - void set_last_snapshot(const SyncSessionSnapshot& snapshot); + void set_last_snapshot(const SyncSessionSnapshot& snapshot) { + previous_session_snapshot_.reset(new SyncSessionSnapshot(snapshot)); + } private: // Rather than force clients to set and null-out various context members, we diff --git a/chrome/browser/sync/syncable/syncable.cc b/chrome/browser/sync/syncable/syncable.cc index 2d51526..d1fd9d6 100644 --- a/chrome/browser/sync/syncable/syncable.cc +++ b/chrome/browser/sync/syncable/syncable.cc @@ -154,13 +154,6 @@ bool LessPathNames::operator() (const string& a, const string& b) const { } /////////////////////////////////////////////////////////////////////////// -// EntryKernel - -EntryKernel::EntryKernel() : dirty_(false) {} - -EntryKernel::~EntryKernel() {} - -/////////////////////////////////////////////////////////////////////////// // Directory static const DirectoryChangeEvent kShutdownChangesEvent = @@ -171,21 +164,6 @@ void Directory::init_kernel(const std::string& name) { kernel_ = new Kernel(FilePath(), name, KernelLoadInfo()); } -Directory::PersistedKernelInfo::PersistedKernelInfo() - : next_id(0) { - for (int i = 0; i < MODEL_TYPE_COUNT; ++i) { - last_download_timestamp[i] = 0; - } -} - -Directory::PersistedKernelInfo::~PersistedKernelInfo() {} - -Directory::SaveChangesSnapshot::SaveChangesSnapshot() - : kernel_info_status(KERNEL_SHARE_INFO_INVALID) { -} - -Directory::SaveChangesSnapshot::~SaveChangesSnapshot() {} - Directory::Kernel::Kernel(const FilePath& db_path, const string& name, const KernelLoadInfo& info) diff --git a/chrome/browser/sync/syncable/syncable.h b/chrome/browser/sync/syncable/syncable.h index a3c2212..7cdae1c 100644 --- a/chrome/browser/sync/syncable/syncable.h +++ b/chrome/browser/sync/syncable/syncable.h @@ -228,8 +228,7 @@ struct EntryKernel { std::bitset<BIT_TEMPS_COUNT> bit_temps; public: - EntryKernel(); - ~EntryKernel(); + EntryKernel() : dirty_(false) {} // Set the dirty bit, and optionally add this entry's metahandle to // a provided index on dirty bits in |dirty_index|. Parameter may be null, @@ -660,9 +659,6 @@ class Directory { // Various data that the Directory::Kernel we are backing (persisting data // for) needs saved across runs of the application. struct PersistedKernelInfo { - PersistedKernelInfo(); - ~PersistedKernelInfo(); - // Last sync timestamp fetched from the server. int64 last_download_timestamp[MODEL_TYPE_COUNT]; // true iff we ever reached the end of the changelog. @@ -672,6 +668,11 @@ class Directory { std::string store_birthday; // The next local ID that has not been used with this cache-GUID. int64 next_id; + PersistedKernelInfo() : next_id(0) { + for (int i = 0; i < MODEL_TYPE_COUNT; ++i) { + last_download_timestamp[i] = 0; + } + } }; // What the Directory needs on initialization to create itself and its Kernel. @@ -696,13 +697,12 @@ class Directory { // constructed and forms a consistent snapshot of what needs to be sent to // the backing store. struct SaveChangesSnapshot { - SaveChangesSnapshot(); - ~SaveChangesSnapshot(); - KernelShareInfoStatus kernel_info_status; PersistedKernelInfo kernel_info; OriginalEntries dirty_metas; MetahandleSet metahandles_to_purge; + SaveChangesSnapshot() : kernel_info_status(KERNEL_SHARE_INFO_INVALID) { + } }; Directory(); diff --git a/chrome/browser/sync/util/crypto_helpers.cc b/chrome/browser/sync/util/crypto_helpers.cc index 9315d8b..b01e01f 100644 --- a/chrome/browser/sync/util/crypto_helpers.cc +++ b/chrome/browser/sync/util/crypto_helpers.cc @@ -21,8 +21,6 @@ MD5Calculator::MD5Calculator() { MD5Init(&context_); } -MD5Calculator::~MD5Calculator() {} - void MD5Calculator::AddData(const unsigned char* data, int length) { CHECK(bin_digest_.empty()); MD5Update(&context_, data, length); @@ -36,7 +34,7 @@ void MD5Calculator::CalcDigest() { } } -const vector<uint8>& MD5Calculator::GetDigest() { +vector<uint8> MD5Calculator::GetDigest() { CalcDigest(); return bin_digest_; } diff --git a/chrome/browser/sync/util/crypto_helpers.h b/chrome/browser/sync/util/crypto_helpers.h index 34b36f4..5660447 100644 --- a/chrome/browser/sync/util/crypto_helpers.h +++ b/chrome/browser/sync/util/crypto_helpers.h @@ -22,13 +22,13 @@ class MD5Calculator { void CalcDigest(); public: MD5Calculator(); - ~MD5Calculator(); + ~MD5Calculator() {} void AddData(const uint8* data, int length); void AddData(const char* data, int length) { AddData(reinterpret_cast<const uint8*>(data), length); } std::string GetHexDigest(); - const std::vector<uint8>& GetDigest(); + std::vector<uint8> GetDigest(); private: DISALLOW_COPY_AND_ASSIGN(MD5Calculator); }; diff --git a/chrome/browser/sync/util/cryptographer.cc b/chrome/browser/sync/util/cryptographer.cc index 747b094..2a3701e 100644 --- a/chrome/browser/sync/util/cryptographer.cc +++ b/chrome/browser/sync/util/cryptographer.cc @@ -19,8 +19,6 @@ const char kNigoriKeyName[] = "nigori-key"; Cryptographer::Cryptographer() : default_nigori_(NULL) { } -Cryptographer::~Cryptographer() {} - void Cryptographer::Bootstrap(const std::string& restored_bootstrap_token) { if (is_ready()) { NOTREACHED(); diff --git a/chrome/browser/sync/util/cryptographer.h b/chrome/browser/sync/util/cryptographer.h index ada084cc..230ed94 100644 --- a/chrome/browser/sync/util/cryptographer.h +++ b/chrome/browser/sync/util/cryptographer.h @@ -43,7 +43,6 @@ struct KeyParams { class Cryptographer { public: Cryptographer(); - ~Cryptographer(); // |restored_bootstrap_token| can be provided via this method to bootstrap // Cryptographer instance into the ready state (is_ready will be true). |