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

Side by Side Diff: content/public/browser/browser_thread.h

Issue 1874903002: Convert //content from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indent Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // Foo, BrowserThread::DeleteOnIOThread> { 278 // Foo, BrowserThread::DeleteOnIOThread> {
279 // 279 //
280 // ... 280 // ...
281 // private: 281 // private:
282 // friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; 282 // friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>;
283 // friend class base::DeleteHelper<Foo>; 283 // friend class base::DeleteHelper<Foo>;
284 // 284 //
285 // ~Foo(); 285 // ~Foo();
286 // 286 //
287 // Sample usage with scoped_ptr: 287 // Sample usage with scoped_ptr:
288 // scoped_ptr<Foo, BrowserThread::DeleteOnIOThread> ptr; 288 // std::unique_ptr<Foo, BrowserThread::DeleteOnIOThread> ptr;
289 struct DeleteOnUIThread : public DeleteOnThread<UI> { }; 289 struct DeleteOnUIThread : public DeleteOnThread<UI> { };
290 struct DeleteOnIOThread : public DeleteOnThread<IO> { }; 290 struct DeleteOnIOThread : public DeleteOnThread<IO> { };
291 struct DeleteOnFileThread : public DeleteOnThread<FILE> { }; 291 struct DeleteOnFileThread : public DeleteOnThread<FILE> { };
292 struct DeleteOnDBThread : public DeleteOnThread<DB> { }; 292 struct DeleteOnDBThread : public DeleteOnThread<DB> { };
293 293
294 // Returns an appropriate error message for when DCHECK_CURRENTLY_ON() fails. 294 // Returns an appropriate error message for when DCHECK_CURRENTLY_ON() fails.
295 static std::string GetDCheckCurrentlyOnErrorMessage(ID expected); 295 static std::string GetDCheckCurrentlyOnErrorMessage(ID expected);
296 296
297 private: 297 private:
298 friend class BrowserThreadImpl; 298 friend class BrowserThreadImpl;
299 299
300 BrowserThread() {} 300 BrowserThread() {}
301 DISALLOW_COPY_AND_ASSIGN(BrowserThread); 301 DISALLOW_COPY_AND_ASSIGN(BrowserThread);
302 }; 302 };
303 303
304 } // namespace content 304 } // namespace content
305 305
306 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ 306 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_
OLDNEW
« no previous file with comments | « content/public/browser/browser_context.h ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698