diff options
author | hashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-11 04:50:08 +0000 |
---|---|---|
committer | hashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-11 04:50:08 +0000 |
commit | 1cc8f1e0137d469c18cda277593f429761d0c647 (patch) | |
tree | 398a8e16402caaa1222e7cea170217f473cd714e /chrome/browser/chromeos/gdata/find_entry_delegate.h | |
parent | 734ccb90f2c49684d9cab5e857596562b7b569ab (diff) | |
download | chromium_src-1cc8f1e0137d469c18cda277593f429761d0c647.zip chromium_src-1cc8f1e0137d469c18cda277593f429761d0c647.tar.gz chromium_src-1cc8f1e0137d469c18cda277593f429761d0c647.tar.bz2 |
Delete gdata::FindEntryDelegate
Replace all FindEntryDelegate subclasses with ReadOnlyFindEntryCallback and FindEntryCallback
Move FindEntryCallback to find_entry_callback.h
BUG=127028
TEST=unit_tests --gtest_filter="GData*"
Review URL: https://chromiumcodereview.appspot.com/10310077
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136508 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/gdata/find_entry_delegate.h')
-rw-r--r-- | chrome/browser/chromeos/gdata/find_entry_delegate.h | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/chrome/browser/chromeos/gdata/find_entry_delegate.h b/chrome/browser/chromeos/gdata/find_entry_delegate.h deleted file mode 100644 index e5f3e23..0000000 --- a/chrome/browser/chromeos/gdata/find_entry_delegate.h +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2012 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. - -#ifndef CHROME_BROWSER_CHROMEOS_GDATA_FIND_ENTRY_DELEGATE_H_ -#define CHROME_BROWSER_CHROMEOS_GDATA_FIND_ENTRY_DELEGATE_H_ -#pragma once - -#include "base/bind.h" -#include "base/platform_file.h" - -class FilePath; - -namespace gdata { - -class GDataEntry; - -// Used to get result of file search. Please note that |file| is a live -// object provided to this callback under lock. It must not be used outside -// of the callback method. This callback can be invoked on different thread -// than one that started the request. -typedef base::Callback<void(base::PlatformFileError error, - const FilePath& directory_path, - GDataEntry* entry)> - FindEntryCallback; - -// Delegate class used to deal with results synchronous read-only search -// over virtual file system. -class FindEntryDelegate { - public: - virtual ~FindEntryDelegate(); - - // Called when GDataRootDirectory::FindEntryByPath() completes search. - virtual void OnDone(base::PlatformFileError error, - const FilePath& directory_path, - GDataEntry* entry) = 0; -}; - -// Delegate used to find a directory element for file system updates. -class ReadOnlyFindEntryDelegate : public FindEntryDelegate { - public: - ReadOnlyFindEntryDelegate(); - - // Returns found entry. - GDataEntry* entry() { return entry_; } - - private: - // FindEntryDelegate overrides. - virtual void OnDone(base::PlatformFileError error, - const FilePath& directory_path, - GDataEntry* entry) OVERRIDE; - - // Entry that was found. - GDataEntry* entry_; -}; - -// FindEntryCallbackRelayDelegate class implementation. -// This class is used to relay calls between sync and async versions -// of FindFileByPath(Sync|Async) calls. -class FindEntryCallbackRelayDelegate : public FindEntryDelegate { - public: - explicit FindEntryCallbackRelayDelegate(const FindEntryCallback& callback); - virtual ~FindEntryCallbackRelayDelegate(); - - private: - // FindEntryDelegate overrides. - virtual void OnDone(base::PlatformFileError error, - const FilePath& directory_path, - GDataEntry* entry) OVERRIDE; - - const FindEntryCallback callback_; -}; - -} // namespace gdata - -#endif // CHROME_BROWSER_CHROMEOS_GDATA_FIND_ENTRY_DELEGATE_H_ |