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

Side by Side Diff: chrome/browser/mock_browsing_data_file_system_helper.h

Issue 7676002: When deleting storage through the cookies tree model, also update its cache (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_MOCK_BROWSING_DATA_FILE_SYSTEM_HELPER_H_ 5 #ifndef CHROME_BROWSER_MOCK_BROWSING_DATA_FILE_SYSTEM_HELPER_H_
6 #define CHROME_BROWSER_MOCK_BROWSING_DATA_FILE_SYSTEM_HELPER_H_ 6 #define CHROME_BROWSER_MOCK_BROWSING_DATA_FILE_SYSTEM_HELPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list>
9 #include <map> 10 #include <map>
10 #include <vector>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "chrome/browser/browsing_data_file_system_helper.h" 13 #include "chrome/browser/browsing_data_file_system_helper.h"
14 #include "webkit/fileapi/file_system_types.h" 14 #include "webkit/fileapi/file_system_types.h"
15 15
16 // Mock for BrowsingDataFileSystemHelper. 16 // Mock for BrowsingDataFileSystemHelper.
17 // Use AddFileSystemSamples() or add directly to response_ vector, then call 17 // Use AddFileSystemSamples() or add directly to response_ list, then call
18 // Notify(). 18 // Notify().
19 class MockBrowsingDataFileSystemHelper : public BrowsingDataFileSystemHelper { 19 class MockBrowsingDataFileSystemHelper : public BrowsingDataFileSystemHelper {
20 public: 20 public:
21 explicit MockBrowsingDataFileSystemHelper(Profile* profile); 21 explicit MockBrowsingDataFileSystemHelper(Profile* profile);
22 22
23 virtual void StartFetching( 23 virtual void StartFetching(
24 Callback1<const std::vector<FileSystemInfo>& >::Type* callback); 24 Callback1<const std::list<FileSystemInfo>& >::Type* callback);
25 25
26 virtual void CancelNotification(); 26 virtual void CancelNotification();
27 27
28 virtual void DeleteFileSystemOrigin(const GURL& origin); 28 virtual void DeleteFileSystemOrigin(const GURL& origin);
29 29
30 // Adds a specific filesystem. 30 // Adds a specific filesystem.
31 void AddFileSystem(const GURL& origin, 31 void AddFileSystem(const GURL& origin,
32 bool has_persistent, 32 bool has_persistent,
33 bool has_temporary); 33 bool has_temporary);
34 34
(...skipping 10 matching lines...) Expand all
45 // deleted. 45 // deleted.
46 bool AllDeleted(); 46 bool AllDeleted();
47 47
48 GURL last_deleted_origin_; 48 GURL last_deleted_origin_;
49 49
50 private: 50 private:
51 virtual ~MockBrowsingDataFileSystemHelper(); 51 virtual ~MockBrowsingDataFileSystemHelper();
52 52
53 Profile* profile_; 53 Profile* profile_;
54 54
55 scoped_ptr<Callback1<const std::vector<FileSystemInfo>& >::Type > 55 scoped_ptr<Callback1<const std::list<FileSystemInfo>& >::Type >
56 callback_; 56 callback_;
57 57
58 // Stores which filesystems exist. 58 // Stores which filesystems exist.
59 std::map<const std::string, bool> file_systems_; 59 std::map<const std::string, bool> file_systems_;
60 60
61 std::vector<FileSystemInfo> response_; 61 std::list<FileSystemInfo> response_;
62 }; 62 };
63 63
64 #endif // CHROME_BROWSER_MOCK_BROWSING_DATA_FILE_SYSTEM_HELPER_H_ 64 #endif // CHROME_BROWSER_MOCK_BROWSING_DATA_FILE_SYSTEM_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/mock_browsing_data_database_helper.cc ('k') | chrome/browser/mock_browsing_data_file_system_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698