| Index: chrome/browser/chromeos/drive/directory_loader.cc
|
| diff --git a/chrome/browser/chromeos/drive/directory_loader.cc b/chrome/browser/chromeos/drive/directory_loader.cc
|
| index b1512ad0a49585e0e2916342da9c72bb0a8b6c43..7d60858a5f412f8060e2bd807909666d964da86f 100644
|
| --- a/chrome/browser/chromeos/drive/directory_loader.cc
|
| +++ b/chrome/browser/chromeos/drive/directory_loader.cc
|
| @@ -106,7 +106,7 @@ class DirectoryLoader::FeedFetcher {
|
| }
|
|
|
| void Run(const FileOperationCallback& callback) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| DCHECK(!callback.is_null());
|
| DCHECK(!directory_fetch_info_.resource_id().empty());
|
|
|
| @@ -123,7 +123,7 @@ class DirectoryLoader::FeedFetcher {
|
| void OnFileListFetched(const FileOperationCallback& callback,
|
| google_apis::DriveApiErrorCode status,
|
| scoped_ptr<google_apis::FileList> file_list) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| DCHECK(!callback.is_null());
|
|
|
| FileError error = GDataToFileError(status);
|
| @@ -159,7 +159,7 @@ class DirectoryLoader::FeedFetcher {
|
| const GURL& next_url,
|
| const std::vector<ResourceEntry>* refreshed_entries,
|
| FileError error) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| DCHECK(!callback.is_null());
|
|
|
| if (error != FILE_ERROR_OK) {
|
| @@ -216,12 +216,12 @@ DirectoryLoader::~DirectoryLoader() {
|
| }
|
|
|
| void DirectoryLoader::AddObserver(ChangeListLoaderObserver* observer) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| observers_.AddObserver(observer);
|
| }
|
|
|
| void DirectoryLoader::RemoveObserver(ChangeListLoaderObserver* observer) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| observers_.RemoveObserver(observer);
|
| }
|
|
|
| @@ -229,7 +229,7 @@ void DirectoryLoader::ReadDirectory(
|
| const base::FilePath& directory_path,
|
| const ReadDirectoryEntriesCallback& entries_callback,
|
| const FileOperationCallback& completion_callback) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| DCHECK(!completion_callback.is_null());
|
|
|
| ResourceEntry* entry = new ResourceEntry;
|
| @@ -256,7 +256,7 @@ void DirectoryLoader::ReadDirectoryAfterGetEntry(
|
| bool should_try_loading_parent,
|
| const ResourceEntry* entry,
|
| FileError error) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| DCHECK(!completion_callback.is_null());
|
|
|
| if (error == FILE_ERROR_NOT_FOUND &&
|
| @@ -308,7 +308,7 @@ void DirectoryLoader::ReadDirectoryAfterLoadParent(
|
| const ReadDirectoryEntriesCallback& entries_callback,
|
| const FileOperationCallback& completion_callback,
|
| FileError error) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| DCHECK(!completion_callback.is_null());
|
|
|
| if (error != FILE_ERROR_OK) {
|
| @@ -337,7 +337,7 @@ void DirectoryLoader::ReadDirectoryAfterGetAboutResource(
|
| const std::string& local_id,
|
| google_apis::DriveApiErrorCode status,
|
| scoped_ptr<google_apis::AboutResource> about_resource) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
|
|
| FileError error = GDataToFileError(status);
|
| if (error != FILE_ERROR_OK) {
|
| @@ -374,7 +374,7 @@ void DirectoryLoader::ReadDirectoryAfterCheckLocalState(
|
| const ResourceEntry* entry,
|
| const int64* local_changestamp,
|
| FileError error) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| DCHECK(about_resource);
|
|
|
| if (error != FILE_ERROR_OK) {
|
| @@ -412,7 +412,7 @@ void DirectoryLoader::ReadDirectoryAfterCheckLocalState(
|
|
|
| void DirectoryLoader::OnDirectoryLoadComplete(const std::string& local_id,
|
| FileError error) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
|
|
| LoadCallbackMap::iterator it = pending_load_callback_.find(local_id);
|
| if (it == pending_load_callback_.end())
|
| @@ -487,7 +487,7 @@ void DirectoryLoader::SendEntries(const std::string& local_id,
|
|
|
| void DirectoryLoader::LoadDirectoryFromServer(
|
| const DirectoryFetchInfo& directory_fetch_info) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| DCHECK(!directory_fetch_info.empty());
|
| DVLOG(1) << "Start loading directory: " << directory_fetch_info.ToString();
|
|
|
| @@ -516,7 +516,7 @@ void DirectoryLoader::LoadDirectoryFromServerAfterLoad(
|
| const DirectoryFetchInfo& directory_fetch_info,
|
| FeedFetcher* fetcher,
|
| FileError error) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| DCHECK(!directory_fetch_info.empty());
|
|
|
| // Delete the fetcher.
|
| @@ -556,7 +556,7 @@ void DirectoryLoader::LoadDirectoryFromServerAfterUpdateChangestamp(
|
| const DirectoryFetchInfo& directory_fetch_info,
|
| const base::FilePath* directory_path,
|
| FileError error) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
|
|
| DVLOG(1) << "Directory loaded: " << directory_fetch_info.ToString();
|
| OnDirectoryLoadComplete(directory_fetch_info.local_id(), error);
|
|
|