0

Replace tracked_objects::Location with base::Location.

Part 3/4 to replace these namespace qualifications.

TBR=dcheng@chromium.org

Bug: 763556
Change-Id: I052b146dd2ce9f5e3997ab5ae1e362b2422fb03e
Reviewed-on: https://chromium-review.googlesource.com/662140
Reviewed-by: Brett Wilson <brettw@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Brett Wilson <brettw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501376}
This commit is contained in:
Brett Wilson
2017-09-12 20:11:15 +00:00
committed by Commit Bot
parent 50e9e5ac22
commit 1c99002ae1
88 changed files with 219 additions and 246 deletions
components
content
crypto
docs/design
extensions/common
ios/web
media/base

@ -66,7 +66,7 @@ SyncDataList FakeSyncableService::GetAllSyncData(ModelType type) const {
}
SyncError FakeSyncableService::ProcessSyncChanges(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const SyncChangeList& change_list) {
return process_sync_changes_error_;
}

@ -43,7 +43,7 @@ class FakeSyncableService : public SyncableService {
std::unique_ptr<SyncErrorFactory> sync_error_factory) override;
void StopSyncing(ModelType type) override;
SyncDataList GetAllSyncData(ModelType type) const override;
SyncError ProcessSyncChanges(const tracked_objects::Location& from_here,
SyncError ProcessSyncChanges(const base::Location& from_here,
const SyncChangeList& change_list) override;
std::unique_ptr<AttachmentStoreForSync> GetAttachmentStoreForSync() override;
void SetAttachmentService(

@ -6,13 +6,13 @@
namespace syncer {
ModelError::ModelError(const tracked_objects::Location& location,
ModelError::ModelError(const base::Location& location,
const std::string& message)
: location_(location), message_(message) {}
ModelError::~ModelError() = default;
const tracked_objects::Location& ModelError::location() const {
const base::Location& ModelError::location() const {
return location_;
}

@ -16,21 +16,20 @@ namespace syncer {
class ModelError {
public:
// Creates a set error object with the given location and message.
ModelError(const tracked_objects::Location& location,
const std::string& message);
ModelError(const base::Location& location, const std::string& message);
~ModelError();
// The location of the error this object represents. Can only be called if the
// error is set.
const tracked_objects::Location& location() const;
const base::Location& location() const;
// The message explaining the error this object represents. Can only be called
// if the error is set.
const std::string& message() const;
private:
tracked_objects::Location location_;
base::Location location_;
std::string message_;
};

@ -101,7 +101,7 @@ class ModelTypeChangeProcessor {
virtual void ReportError(const ModelError& error) = 0;
// A convenience form of the above.
virtual void ReportError(const tracked_objects::Location& location,
virtual void ReportError(const base::Location& location,
const std::string& message) = 0;
};

@ -10,7 +10,7 @@ namespace syncer {
SyncChange::SyncChange() : change_type_(ACTION_INVALID) {}
SyncChange::SyncChange(const tracked_objects::Location& from_here,
SyncChange::SyncChange(const base::Location& from_here,
SyncChangeType change_type,
const SyncData& sync_data)
: location_(from_here), change_type_(change_type), sync_data_(sync_data) {
@ -48,7 +48,7 @@ SyncData SyncChange::sync_data() const {
return sync_data_;
}
tracked_objects::Location SyncChange::location() const {
base::Location SyncChange::location() const {
return location_;
}

@ -31,7 +31,7 @@ class SyncChange {
// Default constructor creates an invalid change.
SyncChange();
// Create a new change with the specified sync data.
SyncChange(const tracked_objects::Location& from_here,
SyncChange(const base::Location& from_here,
SyncChangeType change_type,
const SyncData& sync_data);
~SyncChange();
@ -49,7 +49,7 @@ class SyncChange {
// Getters.
SyncChangeType change_type() const;
SyncData sync_data() const;
tracked_objects::Location location() const;
base::Location location() const;
// Returns a string representation of |change_type|.
static std::string ChangeTypeToString(SyncChangeType change_type);
@ -59,7 +59,7 @@ class SyncChange {
std::string ToString() const;
private:
tracked_objects::Location location_;
base::Location location_;
SyncChangeType change_type_;

@ -15,7 +15,7 @@ SyncChangeProcessorWrapperForTest::SyncChangeProcessorWrapperForTest(
SyncChangeProcessorWrapperForTest::~SyncChangeProcessorWrapperForTest() {}
SyncError SyncChangeProcessorWrapperForTest::ProcessSyncChanges(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const SyncChangeList& change_list) {
return wrapped_->ProcessSyncChanges(from_here, change_list);
}

@ -21,7 +21,7 @@ class SyncChangeProcessorWrapperForTest : public SyncChangeProcessor {
~SyncChangeProcessorWrapperForTest() override;
// SyncChangeProcessor implementation.
SyncError ProcessSyncChanges(const tracked_objects::Location& from_here,
SyncError ProcessSyncChanges(const base::Location& from_here,
const SyncChangeList& change_list) override;
SyncDataList GetAllSyncData(ModelType type) const override;

@ -15,7 +15,7 @@ SyncError::SyncError() {
Clear();
}
SyncError::SyncError(const tracked_objects::Location& location,
SyncError::SyncError(const base::Location& location,
ErrorType error_type,
const std::string& message,
ModelType model_type) {
@ -54,18 +54,18 @@ void SyncError::Clear() {
error_type_ = UNSET;
}
void SyncError::Reset(const tracked_objects::Location& location,
void SyncError::Reset(const base::Location& location,
const std::string& message,
ModelType model_type) {
Init(location, message, model_type, DATATYPE_ERROR);
PrintLogError();
}
void SyncError::Init(const tracked_objects::Location& location,
void SyncError::Init(const base::Location& location,
const std::string& message,
ModelType model_type,
ErrorType error_type) {
location_ = std::make_unique<tracked_objects::Location>(location);
location_ = std::make_unique<base::Location>(location);
message_ = message;
model_type_ = model_type;
error_type_ = error_type;
@ -75,7 +75,7 @@ bool SyncError::IsSet() const {
return error_type_ != UNSET;
}
const tracked_objects::Location& SyncError::location() const {
const base::Location& SyncError::location() const {
CHECK(IsSet());
return *location_;
}

@ -18,9 +18,8 @@ class SyncErrorFactory {
virtual ~SyncErrorFactory();
// Creates a SyncError object and uploads this call stack to breakpad.
virtual SyncError CreateAndUploadError(
const tracked_objects::Location& location,
const std::string& message) = 0;
virtual SyncError CreateAndUploadError(const base::Location& location,
const std::string& message) = 0;
};
} // namespace syncer

@ -18,7 +18,7 @@ class SyncErrorFactoryMock : public SyncErrorFactory {
virtual ~SyncErrorFactoryMock();
MOCK_METHOD2(CreateAndUploadError,
SyncError(const tracked_objects::Location& location,
SyncError(const base::Location& location,
const std::string& message));
};

@ -21,7 +21,7 @@ TEST_F(SyncErrorTest, Unset) {
}
TEST_F(SyncErrorTest, Default) {
tracked_objects::Location location = FROM_HERE;
base::Location location = FROM_HERE;
std::string msg = "test";
ModelType type = PREFERENCES;
SyncError error(location, SyncError::DATATYPE_ERROR, msg, type);
@ -34,7 +34,7 @@ TEST_F(SyncErrorTest, Default) {
}
TEST_F(SyncErrorTest, LowSeverity) {
tracked_objects::Location location = FROM_HERE;
base::Location location = FROM_HERE;
std::string msg = "test";
ModelType type = PREFERENCES;
SyncError error(location, SyncError::DATATYPE_POLICY_ERROR, msg, type);
@ -48,7 +48,7 @@ TEST_F(SyncErrorTest, LowSeverity) {
}
TEST_F(SyncErrorTest, Reset) {
tracked_objects::Location location = FROM_HERE;
base::Location location = FROM_HERE;
std::string msg = "test";
ModelType type = PREFERENCES;
@ -61,7 +61,7 @@ TEST_F(SyncErrorTest, Reset) {
EXPECT_EQ(msg, error.message());
EXPECT_EQ(type, error.model_type());
tracked_objects::Location location2 = FROM_HERE;
base::Location location2 = FROM_HERE;
std::string msg2 = "test";
ModelType type2 = PREFERENCES;
error.Reset(location2, msg2, type2);
@ -72,7 +72,7 @@ TEST_F(SyncErrorTest, Reset) {
}
TEST_F(SyncErrorTest, Copy) {
tracked_objects::Location location = FROM_HERE;
base::Location location = FROM_HERE;
std::string msg = "test";
ModelType type = PREFERENCES;
@ -100,7 +100,7 @@ TEST_F(SyncErrorTest, Copy) {
}
TEST_F(SyncErrorTest, Assign) {
tracked_objects::Location location = FROM_HERE;
base::Location location = FROM_HERE;
std::string msg = "test";
ModelType type = PREFERENCES;
@ -127,7 +127,7 @@ TEST_F(SyncErrorTest, Assign) {
}
TEST_F(SyncErrorTest, ToString) {
tracked_objects::Location location = FROM_HERE;
base::Location location = FROM_HERE;
std::string msg = "test";
ModelType type = PREFERENCES;
std::string expected = std::string(ModelTypeToString(type)) +

@ -173,9 +173,8 @@ void SharedModelTypeProcessor::ReportError(const ModelError& error) {
}
}
void SharedModelTypeProcessor::ReportError(
const tracked_objects::Location& location,
const std::string& message) {
void SharedModelTypeProcessor::ReportError(const base::Location& location,
const std::string& message) {
ReportError(ModelError(location, message));
}

@ -68,7 +68,7 @@ class SharedModelTypeProcessor : public ModelTypeProcessor,
void DisableSync() override;
bool IsTrackingMetadata() override;
void ReportError(const ModelError& error) override;
void ReportError(const tracked_objects::Location& location,
void ReportError(const base::Location& location,
const std::string& message) override;
// ModelTypeProcessor implementation.

@ -227,7 +227,7 @@ void Directory::Close() {
}
void Directory::OnUnrecoverableError(const BaseTransaction* trans,
const tracked_objects::Location& location,
const base::Location& location,
const std::string& message) {
DCHECK(trans != nullptr);
unrecoverable_error_set_ = true;

@ -348,7 +348,7 @@ class Directory {
// Called to set the unrecoverable error on the directory and to propagate
// the error to upper layers.
void OnUnrecoverableError(const BaseTransaction* trans,
const tracked_objects::Location& location,
const base::Location& location,
const std::string& message);
DeleteJournal* delete_journal();

@ -11,7 +11,7 @@ namespace syncer {
//////////////////////////////////////////////////////////////////////////
// ReadTransaction member definitions
ReadTransaction::ReadTransaction(const tracked_objects::Location& from_here,
ReadTransaction::ReadTransaction(const base::Location& from_here,
UserShare* share)
: BaseTransaction(share), transaction_(nullptr), close_transaction_(true) {
transaction_ =

@ -30,9 +30,8 @@ void BaseTransaction::Unlock() {
directory_->kernel()->transaction_mutex.Release();
}
void BaseTransaction::OnUnrecoverableError(
const tracked_objects::Location& location,
const std::string& message) {
void BaseTransaction::OnUnrecoverableError(const base::Location& location,
const std::string& message) {
unrecoverable_error_set_ = true;
unrecoverable_error_location_ = location;
unrecoverable_error_msg_ = message;
@ -55,7 +54,7 @@ void BaseTransaction::HandleUnrecoverableErrorIfSet() {
}
}
BaseTransaction::BaseTransaction(const tracked_objects::Location& from_here,
BaseTransaction::BaseTransaction(const base::Location& from_here,
const char* name,
WriterTag writer,
Directory* directory)

@ -46,13 +46,13 @@ class BaseTransaction {
// called we set a bool in the transaction. The caller has to unwind the
// stack. When the destructor for the transaction is called it acts upon the
// bool and calls the Directory to handle the unrecoverable error.
void OnUnrecoverableError(const tracked_objects::Location& location,
void OnUnrecoverableError(const base::Location& location,
const std::string& message);
bool unrecoverable_error_set() const;
protected:
BaseTransaction(const tracked_objects::Location& from_here,
BaseTransaction(const base::Location& from_here,
const char* name,
WriterTag writer,
Directory* directory);
@ -66,14 +66,14 @@ class BaseTransaction {
// thread could call the method at a time.
void HandleUnrecoverableErrorIfSet();
const tracked_objects::Location from_here_;
const base::Location from_here_;
const char* const name_;
WriterTag writer_;
Directory* const directory_;
// Error information.
bool unrecoverable_error_set_;
tracked_objects::Location unrecoverable_error_location_;
base::Location unrecoverable_error_location_;
std::string unrecoverable_error_msg_;
private:

@ -7,11 +7,10 @@
namespace syncer {
namespace syncable {
BaseWriteTransaction::BaseWriteTransaction(
const tracked_objects::Location location,
const char* name,
WriterTag writer,
Directory* directory)
BaseWriteTransaction::BaseWriteTransaction(const base::Location location,
const char* name,
WriterTag writer,
Directory* directory)
: BaseTransaction(location, name, writer, directory) {}
BaseWriteTransaction::~BaseWriteTransaction() {}

@ -18,7 +18,7 @@ class BaseWriteTransaction : public BaseTransaction {
virtual void TrackChangesTo(const EntryKernel* entry) = 0;
protected:
BaseWriteTransaction(const tracked_objects::Location location,
BaseWriteTransaction(const base::Location location,
const char* name,
WriterTag writer,
Directory* directory);

@ -10,7 +10,7 @@ namespace syncer {
namespace syncable {
ModelNeutralWriteTransaction::ModelNeutralWriteTransaction(
const tracked_objects::Location& location,
const base::Location& location,
WriterTag writer,
Directory* directory)
: BaseWriteTransaction(location,

@ -23,7 +23,7 @@ namespace syncable {
// DirectoryChangeDelegate.
class ModelNeutralWriteTransaction : public BaseWriteTransaction {
public:
ModelNeutralWriteTransaction(const tracked_objects::Location& location,
ModelNeutralWriteTransaction(const base::Location& location,
WriterTag writer,
Directory* directory);
~ModelNeutralWriteTransaction() override;

@ -7,7 +7,7 @@
namespace syncer {
namespace syncable {
ReadTransaction::ReadTransaction(const tracked_objects::Location& location,
ReadTransaction::ReadTransaction(const base::Location& location,
Directory* directory)
: BaseTransaction(location, "ReadTransaction", INVALID, directory) {
Lock();

@ -19,8 +19,7 @@ namespace syncable {
// Locks db in constructor, unlocks in destructor.
class ReadTransaction : public BaseTransaction {
public:
ReadTransaction(const tracked_objects::Location& from_here,
Directory* directory);
ReadTransaction(const base::Location& from_here, Directory* directory);
~ReadTransaction() override;

@ -80,7 +80,7 @@ void ChangeEntryIDAndUpdateChildren(BaseWriteTransaction* trans,
// 1. Sets unrecoverable error on transaction.
// 2. Returns false.
bool SyncAssert(bool condition,
const tracked_objects::Location& location,
const base::Location& location,
const char* msg,
BaseTransaction* trans) {
if (!condition) {

@ -17,7 +17,7 @@ namespace syncable {
const int64_t kInvalidTransactionVersion = -1;
WriteTransaction::WriteTransaction(const tracked_objects::Location& location,
WriteTransaction::WriteTransaction(const base::Location& location,
WriterTag writer,
Directory* directory)
: BaseWriteTransaction(location, "WriteTransaction", writer, directory),
@ -25,7 +25,7 @@ WriteTransaction::WriteTransaction(const tracked_objects::Location& location,
Lock();
}
WriteTransaction::WriteTransaction(const tracked_objects::Location& location,
WriteTransaction::WriteTransaction(const base::Location& location,
Directory* directory,
int64_t* transaction_version)
: BaseWriteTransaction(location, "WriteTransaction", SYNCAPI, directory),

@ -21,7 +21,7 @@ extern const int64_t kInvalidTransactionVersion;
// Locks db in constructor, unlocks in destructor.
class WriteTransaction : public BaseWriteTransaction {
public:
WriteTransaction(const tracked_objects::Location& from_here,
WriteTransaction(const base::Location& from_here,
WriterTag writer,
Directory* directory);
@ -30,7 +30,7 @@ class WriteTransaction : public BaseWriteTransaction {
// the new transaction version of the model and modified nodes will be saved
// in |transaction_version| upon destruction of the transaction. If model is
// not changed, |transaction_version| will be kInvalidTransactionVersion.
WriteTransaction(const tracked_objects::Location& from_here,
WriteTransaction(const base::Location& from_here,
Directory* directory,
int64_t* transaction_version);

@ -12,14 +12,14 @@ namespace syncer {
//////////////////////////////////////////////////////////////////////////
// WriteTransaction member definitions
WriteTransaction::WriteTransaction(const tracked_objects::Location& from_here,
WriteTransaction::WriteTransaction(const base::Location& from_here,
UserShare* share)
: BaseTransaction(share), transaction_(nullptr) {
transaction_ = new syncable::WriteTransaction(from_here, syncable::SYNCAPI,
share->directory.get());
}
WriteTransaction::WriteTransaction(const tracked_objects::Location& from_here,
WriteTransaction::WriteTransaction(const base::Location& from_here,
UserShare* share,
int64_t* new_model_version)
: BaseTransaction(share), transaction_(nullptr) {

@ -14,7 +14,7 @@ namespace syncable {
WriteTransactionInfo::WriteTransactionInfo(
int64_t id,
tracked_objects::Location location,
base::Location location,
WriterTag writer,
ImmutableEntryKernelMutationMap mutations)
: id(id),

@ -21,7 +21,7 @@ namespace syncable {
// A struct describing the changes made during a transaction.
struct WriteTransactionInfo {
WriteTransactionInfo(int64_t id,
tracked_objects::Location location,
base::Location location,
WriterTag writer,
ImmutableEntryKernelMutationMap mutations);
WriteTransactionInfo();
@ -32,7 +32,7 @@ struct WriteTransactionInfo {
size_t max_mutations_size) const;
int64_t id;
// If tracked_objects::Location becomes assignable, we can use that
// If base::Location becomes assignable, we can use that
// instead.
std::string location_string;
WriterTag writer;

@ -16,16 +16,16 @@ void FakeSyncScheduler::Stop() {}
void FakeSyncScheduler::ScheduleLocalNudge(
ModelTypeSet types,
const tracked_objects::Location& nudge_location) {}
const base::Location& nudge_location) {}
void FakeSyncScheduler::ScheduleLocalRefreshRequest(
ModelTypeSet types,
const tracked_objects::Location& nudge_location) {}
const base::Location& nudge_location) {}
void FakeSyncScheduler::ScheduleInvalidationNudge(
ModelType type,
std::unique_ptr<InvalidationInterface> interface,
const tracked_objects::Location& nudge_location) {}
const base::Location& nudge_location) {}
void FakeSyncScheduler::ScheduleConfiguration(
const ConfigurationParams& params) {

@ -23,16 +23,15 @@ class FakeSyncScheduler : public SyncScheduler {
void Start(Mode mode, base::Time last_poll_time) override;
void Stop() override;
void ScheduleLocalNudge(
ModelTypeSet types,
const tracked_objects::Location& nudge_location) override;
void ScheduleLocalNudge(ModelTypeSet types,
const base::Location& nudge_location) override;
void ScheduleLocalRefreshRequest(
ModelTypeSet types,
const tracked_objects::Location& nudge_location) override;
const base::Location& nudge_location) override;
void ScheduleInvalidationNudge(
ModelType type,
std::unique_ptr<InvalidationInterface> interface,
const tracked_objects::Location& nudge_location) override;
const base::Location& nudge_location) override;
void ScheduleConfiguration(const ConfigurationParams& params) override;
void ScheduleClearServerData(const ClearParams& params) override;

@ -166,7 +166,7 @@ class LoggingUnrecoverableErrorHandler : public UnrecoverableErrorHandler {
public:
~LoggingUnrecoverableErrorHandler() override {}
void OnUnrecoverableError(const tracked_objects::Location& from_here,
void OnUnrecoverableError(const base::Location& from_here,
const std::string& message) override {
if (LOG_IS_ON(ERROR)) {
logging::LogMessage(from_here.file_name(), from_here.line_number(),

@ -353,7 +353,7 @@ syncer::SyncDataList PrefModelAssociator::GetAllSyncData(
}
syncer::SyncError PrefModelAssociator::ProcessSyncChanges(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const syncer::SyncChangeList& change_list) {
if (!models_associated_) {
syncer::SyncError error(FROM_HERE, syncer::SyncError::DATATYPE_ERROR,

@ -52,7 +52,7 @@ class PrefModelAssociator : public syncer::SyncableService {
// syncer::SyncableService implementation.
syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override;
syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const syncer::SyncChangeList& change_list) override;
syncer::SyncMergeResult MergeDataAndStartSyncing(
syncer::ModelType type,

@ -76,7 +76,7 @@ class TestSyncProcessorStub : public syncer::SyncChangeProcessor {
explicit TestSyncProcessorStub(syncer::SyncChangeList* output)
: output_(output), fail_next_(false) {}
syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const syncer::SyncChangeList& change_list) override {
if (output_)
output_->insert(output_->end(), change_list.begin(), change_list.end());

@ -330,7 +330,7 @@ syncer::SyncDataList FaviconCache::GetAllSyncData(syncer::ModelType type)
}
syncer::SyncError FaviconCache::ProcessSyncChanges(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const syncer::SyncChangeList& change_list) {
if (!favicon_images_sync_processor_.get() ||
!favicon_tracking_sync_processor_.get()) {

@ -74,7 +74,7 @@ class FaviconCache : public syncer::SyncableService,
void StopSyncing(syncer::ModelType type) override;
syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override;
syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const syncer::SyncChangeList& change_list) override;
// If a valid favicon for the icon at |favicon_url| is found, fills

@ -42,7 +42,7 @@ class TestChangeProcessor : public syncer::SyncChangeProcessor {
// Store a copy of all the changes passed in so we can examine them later.
syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const syncer::SyncChangeList& change_list) override;
syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override {
@ -83,7 +83,7 @@ TestChangeProcessor::~TestChangeProcessor() {
}
syncer::SyncError TestChangeProcessor::ProcessSyncChanges(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const syncer::SyncChangeList& change_list) {
if (erroneous_) {
return syncer::SyncError(

@ -678,7 +678,7 @@ bool SessionsSyncManager::GetLocalSession(const SyncedSession** local_session) {
}
syncer::SyncError SessionsSyncManager::ProcessSyncChanges(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const syncer::SyncChangeList& change_list) {
if (!sync_processor_.get()) {
syncer::SyncError error(FROM_HERE, syncer::SyncError::DATATYPE_ERROR,

@ -80,7 +80,7 @@ class SessionsSyncManager : public syncer::SyncableService,
void StopSyncing(syncer::ModelType type) override;
syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override;
syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const syncer::SyncChangeList& change_list) override;
// OpenTabsUIDelegate implementation.

@ -424,7 +424,7 @@ class TestSyncedWindowDelegatesGetter : public SyncedWindowDelegatesGetter {
class TestSyncChangeProcessor : public syncer::SyncChangeProcessor {
public:
explicit TestSyncChangeProcessor(SyncChangeList* output) : output_(output) {}
SyncError ProcessSyncChanges(const tracked_objects::Location& from_here,
SyncError ProcessSyncChanges(const base::Location& from_here,
const SyncChangeList& change_list) override {
if (error_.IsSet()) {
SyncError error = error_;

@ -146,7 +146,7 @@ syncer::SyncDataList WifiCredentialSyncableService::GetAllSyncData(
}
syncer::SyncError WifiCredentialSyncableService::ProcessSyncChanges(
const tracked_objects::Location& /* caller_location */,
const base::Location& /* caller_location */,
const syncer::SyncChangeList& change_list) {
if (!sync_processor_.get()) {
return syncer::SyncError(

@ -50,7 +50,7 @@ class WifiCredentialSyncableService : public syncer::SyncableService,
void StopSyncing(syncer::ModelType type) override;
syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override;
syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& caller_location,
const base::Location& caller_location,
const syncer::SyncChangeList& change_list) override;
// Adds a WiFiCredential to Chrome Sync. |item_id| is a persistent

@ -18,7 +18,7 @@ namespace {
class FakeTaskRunner : public base::TaskRunner {
public:
bool PostDelayedTask(const tracked_objects::Location& from_here,
bool PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override {
std::move(task).Run();

@ -354,7 +354,7 @@ VisitedLinkMaster::Hash VisitedLinkMaster::TryToAddURL(const GURL& url) {
return AddFingerprint(fingerprint, true);
}
void VisitedLinkMaster::PostIOTask(const tracked_objects::Location& from_here,
void VisitedLinkMaster::PostIOTask(const base::Location& from_here,
const base::Closure& task) {
DCHECK(persist_to_disk_);
BrowserThread::GetBlockingPool()->PostSequencedWorkerTask(sequence_token_,

@ -221,8 +221,7 @@ class VisitedLinkMaster : public VisitedLinkCommon {
// These functions are only called if |persist_to_disk_| is true.
// Posts the given task to the blocking worker pool with our options.
void PostIOTask(const tracked_objects::Location& from_here,
const base::Closure& task);
void PostIOTask(const base::Location& from_here, const base::Closure& task);
// Writes the entire table to disk. It will leave the table file open and
// the handle to it will be stored in file_.

@ -23,7 +23,7 @@ class TracedValue;
/**
* In debug builds we trace the creation origin of BeginFrameArgs objects. We
* reuse the tracked_objects::Location system to do that.
* reuse the base::Location system to do that.
*
* However, in release builds we don't want this as it doubles the size of the
* BeginFrameArgs object. As well it adds a number of largish strings to the
@ -65,8 +65,8 @@ struct VIZ_COMMON_EXPORT BeginFrameArgs {
#ifdef NDEBUG
typedef const void* CreationLocation;
#else
typedef const tracked_objects::Location& CreationLocation;
tracked_objects::Location created_from;
typedef const base::Location& CreationLocation;
base::Location created_from;
#endif
// You should be able to find all instances where a BeginFrame has been

@ -114,7 +114,7 @@ TEST(BeginFrameArgsTest, Create) {
#ifndef NDEBUG
TEST(BeginFrameArgsTest, Location) {
tracked_objects::Location expected_location = BEGINFRAME_FROM_HERE;
base::Location expected_location = BEGINFRAME_FROM_HERE;
BeginFrameArgs args = CreateBeginFrameArgsForTesting(expected_location, 0, 1);
EXPECT_EQ(expected_location.ToString(), args.created_from.ToString());

@ -34,7 +34,7 @@ TestOrderablePendingTask::TestOrderablePendingTask()
task_id_(TestOrderablePendingTask::task_id_counter++) {}
TestOrderablePendingTask::TestOrderablePendingTask(
const tracked_objects::Location& location,
const base::Location& location,
base::OnceClosure task,
base::TimeTicks post_time,
base::TimeDelta delay,
@ -98,10 +98,9 @@ OrderedSimpleTaskRunner::OrderedSimpleTaskRunner(
OrderedSimpleTaskRunner::~OrderedSimpleTaskRunner() {}
// base::TestSimpleTaskRunner implementation
bool OrderedSimpleTaskRunner::PostDelayedTask(
const tracked_objects::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
bool OrderedSimpleTaskRunner::PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
DCHECK(thread_checker_.CalledOnValidThread());
TestOrderablePendingTask pt(from_here, std::move(task), now_src_->NowTicks(),
delay, base::TestPendingTask::NESTABLE);
@ -112,7 +111,7 @@ bool OrderedSimpleTaskRunner::PostDelayedTask(
}
bool OrderedSimpleTaskRunner::PostNonNestableDelayedTask(
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
DCHECK(thread_checker_.CalledOnValidThread());

@ -28,7 +28,7 @@ namespace cc {
class TestOrderablePendingTask : public base::TestPendingTask {
public:
TestOrderablePendingTask();
TestOrderablePendingTask(const tracked_objects::Location& location,
TestOrderablePendingTask(const base::Location& location,
base::OnceClosure task,
base::TimeTicks post_time,
base::TimeDelta delay,
@ -63,10 +63,10 @@ class OrderedSimpleTaskRunner : public base::SingleThreadTaskRunner {
OrderedSimpleTaskRunner(base::SimpleTestTickClock* now_src, bool advance_now);
// base::TestSimpleTaskRunner implementation:
bool PostDelayedTask(const tracked_objects::Location& from_here,
bool PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override;
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
bool PostNonNestableDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override;

@ -77,7 +77,7 @@ class CryptoThreadPool {
worker_thread_.StartWithOptions(options);
}
static bool PostTask(const tracked_objects::Location& from_here,
static bool PostTask(const base::Location& from_here,
const base::Closure& task);
private:
@ -94,7 +94,7 @@ class CryptoThreadPool {
base::LazyInstance<CryptoThreadPool>::Leaky crypto_thread_pool =
LAZY_INSTANCE_INITIALIZER;
bool CryptoThreadPool::PostTask(const tracked_objects::Location& from_here,
bool CryptoThreadPool::PostTask(const base::Location& from_here,
const base::Closure& task) {
return crypto_thread_pool.Get().worker_thread_.task_runner()->PostTask(
from_here, task);

@ -89,9 +89,8 @@ scoped_refptr<WebDatabaseBackend> WebDatabaseService::GetBackend() const {
return web_db_backend_;
}
void WebDatabaseService::ScheduleDBTask(
const tracked_objects::Location& from_here,
const WriteTask& task) {
void WebDatabaseService::ScheduleDBTask(const base::Location& from_here,
const WriteTask& task) {
DCHECK(web_db_backend_.get());
std::unique_ptr<WebDataRequest> request =
web_db_backend_->request_manager()->NewRequest(nullptr);
@ -101,7 +100,7 @@ void WebDatabaseService::ScheduleDBTask(
}
WebDataServiceBase::Handle WebDatabaseService::ScheduleDBTaskWithResult(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const ReadTask& task,
WebDataServiceConsumer* consumer) {
DCHECK(consumer);

@ -60,14 +60,14 @@ class BrowserThreadTaskRunner : public base::SingleThreadTaskRunner {
: id_(identifier) {}
// SingleThreadTaskRunner implementation.
bool PostDelayedTask(const tracked_objects::Location& from_here,
bool PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override {
return BrowserThread::PostDelayedTask(id_, from_here, std::move(task),
delay);
}
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
bool PostNonNestableDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override {
return BrowserThread::PostNonNestableDelayedTask(id_, from_here,
@ -486,12 +486,11 @@ void BrowserThreadImpl::StopRedirectionOfThreadID(
}
// static
bool BrowserThreadImpl::PostTaskHelper(
BrowserThread::ID identifier,
const tracked_objects::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay,
bool nestable) {
bool BrowserThreadImpl::PostTaskHelper(BrowserThread::ID identifier,
const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay,
bool nestable) {
DCHECK_GE(identifier, 0);
DCHECK_LT(identifier, ID_COUNT);
// Optimization: to avoid unnecessary locks, we listed the ID enumeration in
@ -533,7 +532,7 @@ bool BrowserThreadImpl::PostTaskHelper(
// static
bool BrowserThread::PostBlockingPoolSequencedTask(
const std::string& sequence_token_name,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task) {
return g_globals.Get().blocking_pool->PostNamedSequencedWorkerTask(
sequence_token_name, from_here, std::move(task));
@ -541,7 +540,7 @@ bool BrowserThread::PostBlockingPoolSequencedTask(
// static
void BrowserThread::PostAfterStartupTask(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const scoped_refptr<base::TaskRunner>& task_runner,
base::OnceClosure task) {
GetContentClient()->browser()->PostAfterStartupTask(from_here, task_runner,
@ -604,7 +603,7 @@ bool BrowserThread::IsMessageLoopValid(ID identifier) {
// static
bool BrowserThread::PostTask(ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task) {
return BrowserThreadImpl::PostTaskHelper(
identifier, from_here, std::move(task), base::TimeDelta(), true);
@ -612,7 +611,7 @@ bool BrowserThread::PostTask(ID identifier,
// static
bool BrowserThread::PostDelayedTask(ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
return BrowserThreadImpl::PostTaskHelper(identifier, from_here,
@ -620,27 +619,25 @@ bool BrowserThread::PostDelayedTask(ID identifier,
}
// static
bool BrowserThread::PostNonNestableTask(
ID identifier,
const tracked_objects::Location& from_here,
base::OnceClosure task) {
bool BrowserThread::PostNonNestableTask(ID identifier,
const base::Location& from_here,
base::OnceClosure task) {
return BrowserThreadImpl::PostTaskHelper(
identifier, from_here, std::move(task), base::TimeDelta(), false);
}
// static
bool BrowserThread::PostNonNestableDelayedTask(
ID identifier,
const tracked_objects::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
bool BrowserThread::PostNonNestableDelayedTask(ID identifier,
const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
return BrowserThreadImpl::PostTaskHelper(identifier, from_here,
std::move(task), delay, false);
}
// static
bool BrowserThread::PostTaskAndReply(ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task,
base::OnceClosure reply) {
return GetTaskRunnerForThread(identifier)

@ -35,12 +35,12 @@ class FakeTaskRunner : public base::SingleThreadTaskRunner {
public:
FakeTaskRunner() {}
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
bool PostNonNestableDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override {
return true;
}
bool PostDelayedTask(const tracked_objects::Location& from_here,
bool PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override {
return true;

@ -30,14 +30,14 @@ bool DOMStorageWorkerPoolTaskRunner::RunsTasksInCurrentSequence() const {
}
bool DOMStorageWorkerPoolTaskRunner::PostDelayedTask(
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
return primary_sequence_->PostDelayedTask(from_here, std::move(task), delay);
}
bool DOMStorageWorkerPoolTaskRunner::PostShutdownBlockingTask(
const tracked_objects::Location& from_here,
const base::Location& from_here,
SequenceID sequence_id,
base::OnceClosure task) {
return GetSequencedTaskRunner(sequence_id)
@ -72,15 +72,14 @@ bool MockDOMStorageTaskRunner::RunsTasksInCurrentSequence() const {
return task_runner_->RunsTasksInCurrentSequence();
}
bool MockDOMStorageTaskRunner::PostDelayedTask(
const tracked_objects::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
bool MockDOMStorageTaskRunner::PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
return task_runner_->PostTask(from_here, std::move(task));
}
bool MockDOMStorageTaskRunner::PostShutdownBlockingTask(
const tracked_objects::Location& from_here,
const base::Location& from_here,
SequenceID sequence_id,
base::OnceClosure task) {
return task_runner_->PostTask(from_here, std::move(task));

@ -33,15 +33,14 @@ class CONTENT_EXPORT DOMStorageTaskRunner
// The PostTask() and PostDelayedTask() methods defined by TaskRunner
// post shutdown-blocking tasks on the primary sequence.
bool PostDelayedTask(const tracked_objects::Location& from_here,
bool PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override = 0;
// Posts a shutdown blocking task to |sequence_id|.
virtual bool PostShutdownBlockingTask(
const tracked_objects::Location& from_here,
SequenceID sequence_id,
base::OnceClosure task) = 0;
virtual bool PostShutdownBlockingTask(const base::Location& from_here,
SequenceID sequence_id,
base::OnceClosure task) = 0;
virtual void AssertIsRunningOnPrimarySequence() const = 0;
virtual void AssertIsRunningOnCommitSequence() const = 0;
@ -65,11 +64,11 @@ class CONTENT_EXPORT DOMStorageWorkerPoolTaskRunner :
bool RunsTasksInCurrentSequence() const override;
bool PostDelayedTask(const tracked_objects::Location& from_here,
bool PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override;
bool PostShutdownBlockingTask(const tracked_objects::Location& from_here,
bool PostShutdownBlockingTask(const base::Location& from_here,
SequenceID sequence_id,
base::OnceClosure task) override;
@ -102,11 +101,11 @@ class CONTENT_EXPORT MockDOMStorageTaskRunner :
bool RunsTasksInCurrentSequence() const override;
bool PostDelayedTask(const tracked_objects::Location& from_here,
bool PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override;
bool PostShutdownBlockingTask(const tracked_objects::Location& from_here,
bool PostShutdownBlockingTask(const base::Location& from_here,
SequenceID sequence_id,
base::OnceClosure task) override;

@ -569,7 +569,7 @@ void MojoAsyncResourceHandler::ReportBadMessage(const std::string& error) {
std::unique_ptr<UploadProgressTracker>
MojoAsyncResourceHandler::CreateUploadProgressTracker(
const tracked_objects::Location& from_here,
const base::Location& from_here,
UploadProgressTracker::UploadProgressReportCallback callback) {
return base::MakeUnique<UploadProgressTracker>(from_here, std::move(callback),
request());

@ -263,7 +263,7 @@ class MojoAsyncResourceHandlerWithStubOperations
}
std::unique_ptr<UploadProgressTracker> CreateUploadProgressTracker(
const tracked_objects::Location& from_here,
const base::Location& from_here,
UploadProgressTracker::UploadProgressReportCallback callback) override {
DCHECK(!upload_progress_tracker_);

@ -16,7 +16,7 @@ constexpr base::TimeDelta kUploadProgressInterval =
} // namespace
UploadProgressTracker::UploadProgressTracker(
const tracked_objects::Location& location,
const base::Location& location,
UploadProgressReportCallback report_progress,
net::URLRequest* request,
scoped_refptr<base::SequencedTaskRunner> task_runner)

@ -20,7 +20,7 @@ namespace {
class TestingUploadProgressTracker : public UploadProgressTracker {
public:
TestingUploadProgressTracker(
const tracked_objects::Location& location,
const base::Location& location,
UploadProgressReportCallback report_callback,
scoped_refptr<base::SingleThreadTaskRunner> task_runner)
: UploadProgressTracker(location,

@ -56,7 +56,7 @@ class MockDeviceClient : public media::VideoCaptureDevice::Client {
MOCK_METHOD0(DoOnIncomingCapturedVideoFrame, void(void));
MOCK_METHOD0(DoResurrectLastOutputBuffer, void(void));
MOCK_METHOD2(OnError,
void(const tracked_objects::Location& from_here,
void(const base::Location& from_here,
const std::string& reason));
MOCK_METHOD0(OnStarted, void(void));

@ -69,7 +69,7 @@ class MockDeviceClient : public media::VideoCaptureDevice::Client {
MOCK_METHOD0(DoOnIncomingCapturedVideoFrame, void(void));
MOCK_METHOD0(DoResurrectLastOutputBuffer, void(void));
MOCK_METHOD2(OnError,
void(const tracked_objects::Location& from_here,
void(const base::Location& from_here,
const std::string& reason));
MOCK_METHOD0(OnStarted, void(void));

@ -31,7 +31,7 @@ class MockDeviceClient : public media::VideoCaptureDevice::Client {
MOCK_METHOD0(DoOnIncomingCapturedVideoFrame, void(void));
MOCK_METHOD0(DoResurrectLastOutputBuffer, void(void));
MOCK_METHOD2(OnError,
void(const tracked_objects::Location& from_here,
void(const base::Location& from_here,
const std::string& reason));
MOCK_CONST_METHOD0(GetBufferPoolUtilization, double(void));
MOCK_METHOD0(OnStarted, void(void));

@ -331,7 +331,7 @@ class StubClient : public media::VideoCaptureDevice::Client {
buffer_pool_, buffer_id, frame_feedback_id);
}
void OnError(const tracked_objects::Location& from_here,
void OnError(const base::Location& from_here,
const std::string& reason) override {
error_callback_.Run();
}

@ -83,12 +83,11 @@ class TextInputClientMacTest : public testing::Test {
// Helper method to post a task on the testing thread's MessageLoop after
// a short delay.
void PostTask(const tracked_objects::Location& from_here,
const base::Closure& task) {
void PostTask(const base::Location& from_here, const base::Closure& task) {
PostTask(from_here, task, base::TimeDelta::FromMilliseconds(kTaskDelayMs));
}
void PostTask(const tracked_objects::Location& from_here,
void PostTask(const base::Location& from_here,
const base::Closure& task,
const base::TimeDelta delay) {
thread_.task_runner()->PostDelayedTask(from_here, task, delay);

@ -1845,9 +1845,8 @@ bool ServiceWorkerDatabase::IsOpen() {
return db_ != NULL;
}
void ServiceWorkerDatabase::Disable(
const tracked_objects::Location& from_here,
Status status) {
void ServiceWorkerDatabase::Disable(const base::Location& from_here,
Status status) {
if (status != STATUS_OK) {
DLOG(ERROR) << "Failed at: " << from_here.ToString()
<< " with error: " << StatusToString(status);
@ -1857,25 +1856,22 @@ void ServiceWorkerDatabase::Disable(
db_.reset();
}
void ServiceWorkerDatabase::HandleOpenResult(
const tracked_objects::Location& from_here,
Status status) {
void ServiceWorkerDatabase::HandleOpenResult(const base::Location& from_here,
Status status) {
if (status != STATUS_OK)
Disable(from_here, status);
ServiceWorkerMetrics::CountOpenDatabaseResult(status);
}
void ServiceWorkerDatabase::HandleReadResult(
const tracked_objects::Location& from_here,
Status status) {
void ServiceWorkerDatabase::HandleReadResult(const base::Location& from_here,
Status status) {
if (status != STATUS_OK)
Disable(from_here, status);
ServiceWorkerMetrics::CountReadDatabaseResult(status);
}
void ServiceWorkerDatabase::HandleWriteResult(
const tracked_objects::Location& from_here,
Status status) {
void ServiceWorkerDatabase::HandleWriteResult(const base::Location& from_here,
Status status) {
if (status != STATUS_OK)
Disable(from_here, status);
ServiceWorkerMetrics::CountWriteDatabaseResult(status);

@ -36,13 +36,11 @@ namespace content {
namespace {
void RunSoon(const tracked_objects::Location& from_here,
const base::Closure& closure) {
void RunSoon(const base::Location& from_here, const base::Closure& closure) {
base::ThreadTaskRunnerHandle::Get()->PostTask(from_here, closure);
}
void RunSoon(const tracked_objects::Location& from_here,
base::OnceClosure closure) {
void RunSoon(const base::Location& from_here, base::OnceClosure closure) {
base::ThreadTaskRunnerHandle::Get()->PostTask(from_here, std::move(closure));
}
@ -59,7 +57,7 @@ void CompleteFindNow(
}
void CompleteFindSoon(
const tracked_objects::Location& from_here,
const base::Location& from_here,
scoped_refptr<ServiceWorkerRegistration> registration,
ServiceWorkerStatusCode status,
const ServiceWorkerStorage::FindRegistrationCallback& callback) {

@ -78,23 +78,22 @@ class StartupTaskRunnerTest : public testing::Test {
class MockTaskRunner {
public:
MOCK_METHOD2(PostDelayedTask,
bool(const tracked_objects::Location&, base::TimeDelta));
MOCK_METHOD2(PostDelayedTask, bool(const base::Location&, base::TimeDelta));
MOCK_METHOD2(PostNonNestableDelayedTask,
bool(const tracked_objects::Location&, base::TimeDelta));
bool(const base::Location&, base::TimeDelta));
};
class TaskRunnerProxy : public base::SingleThreadTaskRunner {
public:
TaskRunnerProxy(MockTaskRunner* mock) : mock_(mock) {}
bool RunsTasksInCurrentSequence() const override { return true; }
bool PostDelayedTask(const tracked_objects::Location& location,
bool PostDelayedTask(const base::Location& location,
base::OnceClosure closure,
base::TimeDelta delta) override {
last_task_ = std::move(closure);
return mock_->PostDelayedTask(location, delta);
}
bool PostNonNestableDelayedTask(const tracked_objects::Location& location,
bool PostNonNestableDelayedTask(const base::Location& location,
base::OnceClosure closure,
base::TimeDelta delta) override {
last_task_ = std::move(closure);

@ -37,7 +37,7 @@ class DoNothingTaskRunner : public base::TaskRunner {
private:
~DoNothingTaskRunner() override {}
bool PostDelayedTask(const tracked_objects::Location& from_here,
bool PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override {
return false;

@ -117,30 +117,29 @@ class CONTENT_EXPORT BrowserThread {
// even if the task is posted, there's no guarantee that it will run, since
// the target thread may already have a Quit message in its queue.
static bool PostTask(ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task);
static bool PostDelayedTask(ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay);
static bool PostNonNestableTask(ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task);
static bool PostNonNestableDelayedTask(
ID identifier,
const tracked_objects::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay);
static bool PostNonNestableDelayedTask(ID identifier,
const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay);
static bool PostTaskAndReply(ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task,
base::OnceClosure reply);
template <typename ReturnType, typename ReplyArgType>
static bool PostTaskAndReplyWithResult(
ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceCallback<ReturnType()> task,
base::OnceCallback<void(ReplyArgType)> reply) {
scoped_refptr<base::SingleThreadTaskRunner> task_runner =
@ -158,7 +157,7 @@ class CONTENT_EXPORT BrowserThread {
template <typename ReturnType, typename ReplyArgType>
static bool PostTaskAndReplyWithResult(
ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::Callback<ReturnType()> task,
base::Callback<void(ReplyArgType)> reply) {
return PostTaskAndReplyWithResult(
@ -169,21 +168,21 @@ class CONTENT_EXPORT BrowserThread {
template <class T>
static bool DeleteSoon(ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
const T* object) {
return GetTaskRunnerForThread(identifier)->DeleteSoon(from_here, object);
}
template <class T>
static bool DeleteSoon(ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
std::unique_ptr<T> object) {
return DeleteSoon(identifier, from_here, object.release());
}
template <class T>
static bool ReleaseSoon(ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
const T* object) {
return GetTaskRunnerForThread(identifier)->ReleaseSoon(from_here, object);
}
@ -206,7 +205,7 @@ class CONTENT_EXPORT BrowserThread {
// GetBlockingPool().
static bool PostBlockingPoolSequencedTask(
const std::string& sequence_token_name,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task);
// For use with scheduling non-critical tasks for execution after startup.
@ -217,7 +216,7 @@ class CONTENT_EXPORT BrowserThread {
// to |task_runner| immediately.
// Note: see related ContentBrowserClient::PostAfterStartupTask.
static void PostAfterStartupTask(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const scoped_refptr<base::TaskRunner>& task_runner,
base::OnceClosure task);

@ -38,7 +38,7 @@ BrowserMainParts* ContentBrowserClient::CreateBrowserMainParts(
}
void ContentBrowserClient::PostAfterStartupTask(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const scoped_refptr<base::TaskRunner>& task_runner,
base::OnceClosure task) {
task_runner->PostTask(from_here, std::move(task));

@ -172,7 +172,7 @@ class CONTENT_EXPORT ContentBrowserClient {
// called on any thread.
// Note: see related BrowserThread::PostAfterStartupTask.
virtual void PostAfterStartupTask(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const scoped_refptr<base::TaskRunner>& task_runner,
base::OnceClosure task);

@ -52,7 +52,7 @@ class CategorizedWorkerPool::CategorizedWorkerPoolSequencedTaskRunner
namespace_token_(task_graph_runner->GenerateNamespaceToken()) {}
// Overridden from base::TaskRunner:
bool PostDelayedTask(const tracked_objects::Location& from_here,
bool PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override {
return PostNonNestableDelayedTask(from_here, std::move(task), delay);
@ -60,7 +60,7 @@ class CategorizedWorkerPool::CategorizedWorkerPoolSequencedTaskRunner
bool RunsTasksInCurrentSequence() const override { return true; }
// Overridden from base::SequencedTaskRunner:
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
bool PostNonNestableDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override {
// Use CHECK instead of DCHECK to crash earlier. See http://crbug.com/711167
@ -187,10 +187,9 @@ void CategorizedWorkerPool::Shutdown() {
}
// Overridden from base::TaskRunner:
bool CategorizedWorkerPool::PostDelayedTask(
const tracked_objects::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
bool CategorizedWorkerPool::PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
base::AutoLock lock(lock_);
// Remove completed tasks.

@ -35,7 +35,7 @@ class CONTENT_EXPORT CategorizedWorkerPool : public base::TaskRunner,
CategorizedWorkerPool();
// Overridden from base::TaskRunner:
bool PostDelayedTask(const tracked_objects::Location& from_here,
bool PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override;
bool RunsTasksInCurrentSequence() const override;

@ -181,7 +181,7 @@ class RTCVideoEncoder::Impl
~Impl() override;
// Logs the |error| and |str| sent from |location| and NotifyError()s forward.
void LogAndNotifyError(const tracked_objects::Location& location,
void LogAndNotifyError(const base::Location& location,
const std::string& str,
media::VideoEncodeAccelerator::Error error);
@ -586,7 +586,7 @@ void RTCVideoEncoder::Impl::NotifyError(
RTCVideoEncoder::Impl::~Impl() { DCHECK(!video_encoder_); }
void RTCVideoEncoder::Impl::LogAndNotifyError(
const tracked_objects::Location& location,
const base::Location& location,
const std::string& str,
media::VideoEncodeAccelerator::Error error) {
static const char* const kErrorNames[] = {

@ -85,7 +85,7 @@ class TestTaskCounter : public base::SingleThreadTaskRunner {
TestTaskCounter() : count_(0) {}
// SingleThreadTaskRunner implementation.
bool PostDelayedTask(const tracked_objects::Location&,
bool PostDelayedTask(const base::Location&,
base::OnceClosure,
base::TimeDelta) override {
base::AutoLock auto_lock(lock_);
@ -93,7 +93,7 @@ class TestTaskCounter : public base::SingleThreadTaskRunner {
return true;
}
bool PostNonNestableDelayedTask(const tracked_objects::Location&,
bool PostNonNestableDelayedTask(const base::Location&,
base::OnceClosure,
base::TimeDelta) override {
base::AutoLock auto_lock(lock_);

@ -63,14 +63,14 @@ class DummyTaskRunner : public base::SingleThreadTaskRunner {
public:
DummyTaskRunner() : thread_id_(base::PlatformThread::CurrentId()) {}
bool PostDelayedTask(const tracked_objects::Location& from_here,
bool PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override {
// Drop the delayed task.
return false;
}
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
bool PostNonNestableDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override {
// Drop the delayed task.

@ -39,7 +39,7 @@ void EnsureOpenSSLInit() {
CRYPTO_library_init();
}
void ClearOpenSSLERRStack(const tracked_objects::Location& location) {
void ClearOpenSSLERRStack(const base::Location& location) {
if (DCHECK_IS_ON() && VLOG_IS_ON(1)) {
uint32_t error_num = ERR_peek_error();
if (error_num == 0)

@ -63,8 +63,7 @@ CRYPTO_EXPORT void EnsureOpenSSLInit();
// Drains the OpenSSL ERR_get_error stack. On a debug build the error codes
// are send to VLOG(1), on a release build they are disregarded. In most
// cases you should pass FROM_HERE as the |location|.
CRYPTO_EXPORT void ClearOpenSSLERRStack(
const tracked_objects::Location& location);
CRYPTO_EXPORT void ClearOpenSSLERRStack(const base::Location& location);
// Place an instance of this class on the call stack to automatically clear
// the OpenSSL error stack on function exit.
@ -73,7 +72,7 @@ class OpenSSLErrStackTracer {
// Pass FROM_HERE as |location|, to help track the source of OpenSSL error
// messages. Note any diagnostic emitted will be tagged with the location of
// the constructor call as it's not possible to trace a destructor's callsite.
explicit OpenSSLErrStackTracer(const tracked_objects::Location& location)
explicit OpenSSLErrStackTracer(const base::Location& location)
: location_(location) {
EnsureOpenSSLInit();
}
@ -82,7 +81,7 @@ class OpenSSLErrStackTracer {
}
private:
const tracked_objects::Location location_;
const base::Location location_;
DISALLOW_IMPLICIT_CONSTRUCTORS(OpenSSLErrStackTracer);
};

@ -145,7 +145,7 @@ a delay on a particular thread. A task is represented by the `base::Closure`
typedef, which contains a `Run()` function, and is created by calling
`base::Bind()`. To process a task, the message loop eventually calls
`base::Closure`'s `Run` function, and then drops the reference to the task
object. Both `PostTask` and `PostDelayedTask` take a `tracked_objects::Location`
object. Both `PostTask` and `PostDelayedTask` take a `base::Location`
parameter, which is used for lightweight debugging purposes (counts and
primitive profiling of pending and completed tasks can be monitored in a debug
build via the url about:objects). Generally the macro value `FROM_HERE` is the

@ -20,14 +20,14 @@ namespace extensions {
struct OneShotEvent::TaskInfo {
TaskInfo() {}
TaskInfo(const tracked_objects::Location& from_here,
TaskInfo(const base::Location& from_here,
const scoped_refptr<SingleThreadTaskRunner>& runner,
const base::Closure& task,
const base::TimeDelta& delay)
: from_here(from_here), runner(runner), task(task), delay(delay) {
CHECK(runner.get()); // Detect mistakes with a decent stack frame.
}
tracked_objects::Location from_here;
base::Location from_here;
scoped_refptr<SingleThreadTaskRunner> runner;
base::Closure task;
base::TimeDelta delay;
@ -43,20 +43,20 @@ OneShotEvent::OneShotEvent(bool signaled) : signaled_(signaled) {
}
OneShotEvent::~OneShotEvent() {}
void OneShotEvent::Post(const tracked_objects::Location& from_here,
void OneShotEvent::Post(const base::Location& from_here,
const base::Closure& task) const {
PostImpl(from_here, task, base::ThreadTaskRunnerHandle::Get(),
base::TimeDelta());
}
void OneShotEvent::Post(
const tracked_objects::Location& from_here,
const base::Location& from_here,
const base::Closure& task,
const scoped_refptr<SingleThreadTaskRunner>& runner) const {
PostImpl(from_here, task, runner, base::TimeDelta());
}
void OneShotEvent::PostDelayed(const tracked_objects::Location& from_here,
void OneShotEvent::PostDelayed(const base::Location& from_here,
const base::Closure& task,
const base::TimeDelta& delay) const {
PostImpl(from_here, task, base::ThreadTaskRunnerHandle::Get(), delay);
@ -83,7 +83,7 @@ void OneShotEvent::Signal() {
}
}
void OneShotEvent::PostImpl(const tracked_objects::Location& from_here,
void OneShotEvent::PostImpl(const base::Location& from_here,
const base::Closure& task,
const scoped_refptr<SingleThreadTaskRunner>& runner,
const base::TimeDelta& delay) const {

@ -43,13 +43,13 @@ class WebThreadTaskRunner : public base::SingleThreadTaskRunner {
explicit WebThreadTaskRunner(WebThread::ID identifier) : id_(identifier) {}
// SingleThreadTaskRunner implementation.
bool PostDelayedTask(const tracked_objects::Location& from_here,
bool PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override {
return WebThread::PostDelayedTask(id_, from_here, std::move(task), delay);
}
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
bool PostNonNestableDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override {
return WebThread::PostNonNestableDelayedTask(id_, from_here,
@ -234,7 +234,7 @@ WebThreadImpl::~WebThreadImpl() {
// static
bool WebThreadImpl::PostTaskHelper(WebThread::ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay,
bool nestable) {
@ -322,7 +322,7 @@ bool WebThread::IsMessageLoopValid(ID identifier) {
// static
bool WebThread::PostTask(ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task) {
return WebThreadImpl::PostTaskHelper(identifier, from_here, std::move(task),
base::TimeDelta(), true);
@ -330,7 +330,7 @@ bool WebThread::PostTask(ID identifier,
// static
bool WebThread::PostDelayedTask(ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
return WebThreadImpl::PostTaskHelper(identifier, from_here, std::move(task),
@ -339,25 +339,24 @@ bool WebThread::PostDelayedTask(ID identifier,
// static
bool WebThread::PostNonNestableTask(ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task) {
return WebThreadImpl::PostTaskHelper(identifier, from_here, std::move(task),
base::TimeDelta(), false);
}
// static
bool WebThread::PostNonNestableDelayedTask(
ID identifier,
const tracked_objects::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
bool WebThread::PostNonNestableDelayedTask(ID identifier,
const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
return WebThreadImpl::PostTaskHelper(identifier, from_here, std::move(task),
delay, false);
}
// static
bool WebThread::PostTaskAndReply(ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task,
base::OnceClosure reply) {
return GetTaskRunnerForThread(identifier)

@ -43,7 +43,7 @@ class WebThreadImpl : public WebThread, public base::Thread {
void IOThreadRun(base::RunLoop* run_loop);
static bool PostTaskHelper(WebThread::ID identifier,
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay,
bool nestable);

@ -45,7 +45,7 @@ base::OnceClosure MakeClosure(base::OnceCallback<Signature>* callback,
template <typename CallbackType>
class TrampolineHelper {
public:
TrampolineHelper(const tracked_objects::Location& posted_from,
TrampolineHelper(const base::Location& posted_from,
scoped_refptr<base::SequencedTaskRunner> task_runner,
CallbackType callback)
: posted_from_(posted_from),
@ -74,7 +74,7 @@ class TrampolineHelper {
private:
static void ClearCallbackOnTargetTaskRunner(CallbackType) {}
tracked_objects::Location posted_from_;
base::Location posted_from_;
scoped_refptr<base::SequencedTaskRunner> task_runner_;
CallbackType callback_;
};

@ -19,7 +19,7 @@ FakeSingleThreadTaskRunner::FakeSingleThreadTaskRunner(
FakeSingleThreadTaskRunner::~FakeSingleThreadTaskRunner() {}
bool FakeSingleThreadTaskRunner::PostDelayedTask(
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
if (fail_on_next_task_) {
@ -105,7 +105,7 @@ void FakeSingleThreadTaskRunner::Sleep(base::TimeDelta t) {
}
bool FakeSingleThreadTaskRunner::PostNonNestableDelayedTask(
const tracked_objects::Location& from_here,
const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
NOTIMPLEMENTED();