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

Unified Diff: chrome/browser/browsing_data_local_storage_helper.h

Issue 10805015: Move browsing_data_helper files into a separate directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chrome_frame build Created 8 years, 5 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/browsing_data_local_storage_helper.h
diff --git a/chrome/browser/browsing_data_local_storage_helper.h b/chrome/browser/browsing_data_local_storage_helper.h
deleted file mode 100644
index c8979ade9357da871fe79eace20dd2a53a364595..0000000000000000000000000000000000000000
--- a/chrome/browser/browsing_data_local_storage_helper.h
+++ /dev/null
@@ -1,117 +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_BROWSING_DATA_LOCAL_STORAGE_HELPER_H_
-#define CHROME_BROWSER_BROWSING_DATA_LOCAL_STORAGE_HELPER_H_
-
-#include <list>
-#include <set>
-#include <vector>
-
-#include "base/callback.h"
-#include "base/compiler_specific.h"
-#include "base/file_path.h"
-#include "base/memory/ref_counted.h"
-#include "base/synchronization/lock.h"
-#include "base/time.h"
-#include "content/public/browser/dom_storage_context.h"
-#include "chrome/common/url_constants.h"
-#include "googleurl/src/gurl.h"
-
-class Profile;
-
-// This class fetches local storage information and provides a
-// means to delete the data associated with an origin.
-class BrowsingDataLocalStorageHelper
- : public base::RefCounted<BrowsingDataLocalStorageHelper> {
- public:
- // Contains detailed information about local storage.
- struct LocalStorageInfo {
- LocalStorageInfo(
- const GURL& origin_url,
- int64 size,
- base::Time last_modified);
- ~LocalStorageInfo();
-
- GURL origin_url;
- int64 size;
- base::Time last_modified;
- };
-
- explicit BrowsingDataLocalStorageHelper(Profile* profile);
-
- // Starts the fetching process, which will notify its completion via
- // callback. This must be called only in the UI thread.
- virtual void StartFetching(
- const base::Callback<void(const std::list<LocalStorageInfo>&)>& callback);
-
- // Deletes the local storage for the |origin|.
- virtual void DeleteOrigin(const GURL& origin);
-
- protected:
- friend class base::RefCounted<BrowsingDataLocalStorageHelper>;
- virtual ~BrowsingDataLocalStorageHelper();
-
- void CallCompletionCallback();
-
- content::DOMStorageContext* dom_storage_context_; // Owned by the profile
- base::Callback<void(const std::list<LocalStorageInfo>&)> completion_callback_;
- bool is_fetching_;
- std::list<LocalStorageInfo> local_storage_info_;
-
- private:
- void GetUsageInfoCallback(
- const std::vector<dom_storage::DomStorageContext::UsageInfo>& infos);
-
- DISALLOW_COPY_AND_ASSIGN(BrowsingDataLocalStorageHelper);
-};
-
-// This class is a thin wrapper around BrowsingDataLocalStorageHelper that does
-// not fetch its information from the local storage tracker, but gets them
-// passed as a parameter during construction.
-class CannedBrowsingDataLocalStorageHelper
- : public BrowsingDataLocalStorageHelper {
- public:
- explicit CannedBrowsingDataLocalStorageHelper(Profile* profile);
-
- // Return a copy of the local storage helper. Only one consumer can use the
- // StartFetching method at a time, so we need to create a copy of the helper
- // every time we instantiate a cookies tree model for it.
- CannedBrowsingDataLocalStorageHelper* Clone();
-
- // Add a local storage to the set of canned local storages that is returned
- // by this helper.
- void AddLocalStorage(const GURL& origin);
-
- // Clear the list of canned local storages.
- void Reset();
-
- // True if no local storages are currently stored.
- bool empty() const;
-
- // Returns the number of local storages currently stored.
- size_t GetLocalStorageCount() const;
-
- // Returns the set of origins that use local storage.
- const std::set<GURL>& GetLocalStorageInfo() const;
-
- // BrowsingDataLocalStorageHelper implementation.
- virtual void StartFetching(
- const base::Callback<void(const std::list<LocalStorageInfo>&)>& callback)
- OVERRIDE;
-
- private:
- virtual ~CannedBrowsingDataLocalStorageHelper();
-
- // Convert the pending local storage info to local storage info objects.
- void ConvertPendingInfo();
-
- std::set<GURL> pending_local_storage_info_;
-
- Profile* profile_;
-
- DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataLocalStorageHelper);
-};
-
-#endif // CHROME_BROWSER_BROWSING_DATA_LOCAL_STORAGE_HELPER_H_
« no previous file with comments | « chrome/browser/browsing_data_indexed_db_helper_unittest.cc ('k') | chrome/browser/browsing_data_local_storage_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698