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

Side by Side Diff: net/disk_cache/backend_impl.h

Issue 7529043: Rename NET_API to NET_EXPORT, and rename NET_TEST to NET_EXPORT_PRIVATE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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 // See net/disk_cache/disk_cache.h for the public interface of the cache. 5 // See net/disk_cache/disk_cache.h for the public interface of the cache.
6 6
7 #ifndef NET_DISK_CACHE_BACKEND_IMPL_H_ 7 #ifndef NET_DISK_CACHE_BACKEND_IMPL_H_
8 #define NET_DISK_CACHE_BACKEND_IMPL_H_ 8 #define NET_DISK_CACHE_BACKEND_IMPL_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 21 matching lines...) Expand all
32 kUnitTestMode = 1 << 2, // We are modifying the behavior for testing. 32 kUnitTestMode = 1 << 2, // We are modifying the behavior for testing.
33 kUpgradeMode = 1 << 3, // This is the upgrade tool (dump). 33 kUpgradeMode = 1 << 3, // This is the upgrade tool (dump).
34 kNewEviction = 1 << 4, // Use of new eviction was specified. 34 kNewEviction = 1 << 4, // Use of new eviction was specified.
35 kNoRandom = 1 << 5, // Don't add randomness to the behavior. 35 kNoRandom = 1 << 5, // Don't add randomness to the behavior.
36 kNoLoadProtection = 1 << 6, // Don't act conservatively under load. 36 kNoLoadProtection = 1 << 6, // Don't act conservatively under load.
37 kNoBuffering = 1 << 7 // Disable extended IO buffering. 37 kNoBuffering = 1 << 7 // Disable extended IO buffering.
38 }; 38 };
39 39
40 // This class implements the Backend interface. An object of this 40 // This class implements the Backend interface. An object of this
41 // class handles the operations of the cache for a particular profile. 41 // class handles the operations of the cache for a particular profile.
42 class NET_TEST BackendImpl : public Backend { 42 class NET_EXPORT_PRIVATE BackendImpl : public Backend {
43 friend class Eviction; 43 friend class Eviction;
44 public: 44 public:
45 BackendImpl(const FilePath& path, base::MessageLoopProxy* cache_thread, 45 BackendImpl(const FilePath& path, base::MessageLoopProxy* cache_thread,
46 net::NetLog* net_log); 46 net::NetLog* net_log);
47 // mask can be used to limit the usable size of the hash table, for testing. 47 // mask can be used to limit the usable size of the hash table, for testing.
48 BackendImpl(const FilePath& path, uint32 mask, 48 BackendImpl(const FilePath& path, uint32 mask,
49 base::MessageLoopProxy* cache_thread, net::NetLog* net_log); 49 base::MessageLoopProxy* cache_thread, net::NetLog* net_log);
50 virtual ~BackendImpl(); 50 virtual ~BackendImpl();
51 51
52 // Returns a new backend with the desired flags. See the declaration of 52 // Returns a new backend with the desired flags. See the declaration of
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 base::RepeatingTimer<BackendImpl> timer_; // Usage timer. 376 base::RepeatingTimer<BackendImpl> timer_; // Usage timer.
377 base::WaitableEvent done_; // Signals the end of background work. 377 base::WaitableEvent done_; // Signals the end of background work.
378 scoped_refptr<TraceObject> trace_object_; // Inits internal tracing. 378 scoped_refptr<TraceObject> trace_object_; // Inits internal tracing.
379 ScopedRunnableMethodFactory<BackendImpl> factory_; 379 ScopedRunnableMethodFactory<BackendImpl> factory_;
380 base::WeakPtrFactory<BackendImpl> ptr_factory_; 380 base::WeakPtrFactory<BackendImpl> ptr_factory_;
381 381
382 DISALLOW_COPY_AND_ASSIGN(BackendImpl); 382 DISALLOW_COPY_AND_ASSIGN(BackendImpl);
383 }; 383 };
384 384
385 // Returns the prefered max cache size given the available disk space. 385 // Returns the prefered max cache size given the available disk space.
386 NET_TEST int PreferedCacheSize(int64 available); 386 NET_EXPORT_PRIVATE int PreferedCacheSize(int64 available);
387 387
388 } // namespace disk_cache 388 } // namespace disk_cache
389 389
390 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_ 390 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698