Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(622)

Unified Diff: chrome/browser/supervised_user/experimental/supervised_user_blacklist_downloader.h

Issue 1265983007: Popular sites on the NTP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/supervised_user/experimental/supervised_user_blacklist_downloader.h
diff --git a/chrome/browser/supervised_user/experimental/supervised_user_blacklist_downloader.h b/chrome/browser/supervised_user/experimental/supervised_user_blacklist_downloader.h
deleted file mode 100644
index 871d4e0e42383d8a9dd25d3ae5a2b0c108a9c3d6..0000000000000000000000000000000000000000
--- a/chrome/browser/supervised_user/experimental/supervised_user_blacklist_downloader.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2014 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_SUPERVISED_USER_EXPERIMENTAL_SUPERVISED_USER_BLACKLIST_DOWNLOADER_H_
-#define CHROME_BROWSER_SUPERVISED_USER_EXPERIMENTAL_SUPERVISED_USER_BLACKLIST_DOWNLOADER_H_
-
-#include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "net/url_request/url_fetcher_delegate.h"
-
-namespace base {
-class FilePath;
-} // namespace base
-
-namespace net {
-class URLFetcher;
-class URLRequestContextGetter;
-} // namespace net
-
-class GURL;
-
-// Helper class to download a blacklist file from a given URL and store it in a
-// local file. If the local file already exists, reports success without
-// downloading anything.
-class SupervisedUserBlacklistDownloader : public net::URLFetcherDelegate {
- public:
- typedef base::Callback<void(bool /* success */)> DownloadFinishedCallback;
-
- // Directly starts the download (if necessary) and runs |callback| when done.
- // If the instance is destroyed before it is finished, |callback| is not run.
- SupervisedUserBlacklistDownloader(
- const GURL& url,
- const base::FilePath& path,
- net::URLRequestContextGetter* request_context,
- const DownloadFinishedCallback& callback);
- ~SupervisedUserBlacklistDownloader() override;
-
- private:
- // net::URLFetcherDelegate implementation.
- void OnURLFetchComplete(const net::URLFetcher* source) override;
-
- void OnFileExistsCheckDone(bool exists);
-
- DownloadFinishedCallback callback_;
-
- scoped_ptr<net::URLFetcher> fetcher_;
-
- base::WeakPtrFactory<SupervisedUserBlacklistDownloader> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(SupervisedUserBlacklistDownloader);
-};
-
-#endif // CHROME_BROWSER_SUPERVISED_USER_EXPERIMENTAL_SUPERVISED_USER_BLACKLIST_DOWNLOADER_H_

Powered by Google App Engine
This is Rietveld 408576698