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

Side by Side Diff: base/task.h

Issue 3235007: This adds periodic OOM score adjustment, based on the last access time (Closed)
Patch Set: Final review changes Created 10 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/browser_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 BASE_TASK_H_ 5 #ifndef BASE_TASK_H_
6 #define BASE_TASK_H_ 6 #define BASE_TASK_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/non_thread_safe.h" 9 #include "base/non_thread_safe.h"
10 #include "base/raw_scoped_refptr_mismatch_checker.h" 10 #include "base/raw_scoped_refptr_mismatch_checker.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // 264 //
265 // The invocation of DISABLE_RUNNABLE_METHOD_REFCOUNT should be done at the 265 // The invocation of DISABLE_RUNNABLE_METHOD_REFCOUNT should be done at the
266 // global namespace scope. Example: 266 // global namespace scope. Example:
267 // 267 //
268 // namespace foo { 268 // namespace foo {
269 // class Bar { 269 // class Bar {
270 // ... 270 // ...
271 // }; 271 // };
272 // } // namespace foo 272 // } // namespace foo
273 // 273 //
274 // DISABLE_RUNNABLE_METHOD_REFCOUNT(foo::Bar) 274 // DISABLE_RUNNABLE_METHOD_REFCOUNT(foo::Bar);
275 // 275 //
276 // This is different from DISALLOW_COPY_AND_ASSIGN which is declared inside the 276 // This is different from DISALLOW_COPY_AND_ASSIGN which is declared inside the
277 // class. 277 // class.
278 #define DISABLE_RUNNABLE_METHOD_REFCOUNT(TypeName) \ 278 #define DISABLE_RUNNABLE_METHOD_REFCOUNT(TypeName) \
279 template <> \ 279 template <> \
280 struct RunnableMethodTraits<TypeName> { \ 280 struct RunnableMethodTraits<TypeName> { \
281 void RetainCallee(TypeName* manager) {} \ 281 void RetainCallee(TypeName* manager) {} \
282 void ReleaseCallee(TypeName* manager) {} \ 282 void ReleaseCallee(TypeName* manager) {} \
283 } 283 }
284 284
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 inline CancelableTask* NewRunnableFunction(Function function, 517 inline CancelableTask* NewRunnableFunction(Function function,
518 const A& a, const B& b, 518 const A& a, const B& b,
519 const C& c, const D& d, 519 const C& c, const D& d,
520 const E& e, const F& f, 520 const E& e, const F& f,
521 const G& g, const H& h) { 521 const G& g, const H& h) {
522 return new RunnableFunction<Function, Tuple8<A, B, C, D, E, F, G, H> >( 522 return new RunnableFunction<Function, Tuple8<A, B, C, D, E, F, G, H> >(
523 function, MakeTuple(a, b, c, d, e, f, g, h)); 523 function, MakeTuple(a, b, c, d, e, f, g, h));
524 } 524 }
525 525
526 #endif // BASE_TASK_H_ 526 #endif // BASE_TASK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698