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

Side by Side Diff: chrome/browser/ui/webui/chrome_url_data_manager.h

Issue 6624019: Tweaks ChromeURLDataManager comments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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
« no previous file with comments | « no previous file | no next file » | 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) 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_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 struct DeleteDataSource { 45 struct DeleteDataSource {
46 static void Destruct(const DataSource* data_source) { 46 static void Destruct(const DataSource* data_source) {
47 ChromeURLDataManager::DeleteDataSource(data_source); 47 ChromeURLDataManager::DeleteDataSource(data_source);
48 } 48 }
49 }; 49 };
50 50
51 // A DataSource is an object that can answer requests for data 51 // A DataSource is an object that can answer requests for data
52 // asynchronously. DataSources are collectively owned with refcounting smart 52 // asynchronously. DataSources are collectively owned with refcounting smart
53 // pointers and should never be deleted on the IO thread, since their calls 53 // pointers and should never be deleted on the IO thread, since their calls
54 // are handled almost always on the UI thread and there's a possibility of a 54 // are handled almost always on the UI thread and there's a possibility of a
55 // data race. The |DeleteOnUIThread| trait is used to enforce this. 55 // data race. The |DeleteDataSource| trait above is used to enforce this.
56 // 56 //
57 // An implementation of DataSource should handle calls to 57 // An implementation of DataSource should handle calls to
58 // StartDataRequest() by starting its (implementation-specific) asynchronous 58 // StartDataRequest() by starting its (implementation-specific) asynchronous
59 // request for the data, then call SendResponse() to notify. 59 // request for the data, then call SendResponse() to notify.
60 class DataSource : public base::RefCountedThreadSafe< 60 class DataSource : public base::RefCountedThreadSafe<
61 DataSource, DeleteDataSource> { 61 DataSource, DeleteDataSource> {
62 public: 62 public:
63 // See source_name_ and message_loop_ below for docs on these parameters. 63 // See source_name_ and message_loop_ below for docs on these parameters.
64 DataSource(const std::string& source_name, MessageLoop* message_loop); 64 DataSource(const std::string& source_name, MessageLoop* message_loop);
65 65
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // Lock used when accessing |data_sources_|. 172 // Lock used when accessing |data_sources_|.
173 static base::Lock delete_lock_; 173 static base::Lock delete_lock_;
174 174
175 // |data_sources_| that are no longer referenced and scheduled for deletion. 175 // |data_sources_| that are no longer referenced and scheduled for deletion.
176 static DataSources* data_sources_; 176 static DataSources* data_sources_;
177 177
178 DISALLOW_COPY_AND_ASSIGN(ChromeURLDataManager); 178 DISALLOW_COPY_AND_ASSIGN(ChromeURLDataManager);
179 }; 179 };
180 180
181 #endif // CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_ 181 #endif // CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698