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

Side by Side Diff: content/browser/webui/url_data_manager_backend.h

Issue 2475593002: MD History: update (instead of re-create) data sources on sign in change (Closed)
Patch Set: old history as well Created 4 years, 1 month 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_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_ 5 #ifndef CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_
6 #define CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_ 6 #define CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/supports_user_data.h" 15 #include "base/supports_user_data.h"
16 #include "base/values.h"
16 #include "content/browser/webui/url_data_manager.h" 17 #include "content/browser/webui/url_data_manager.h"
17 #include "content/public/browser/url_data_source.h" 18 #include "content/public/browser/url_data_source.h"
18 #include "net/url_request/url_request_job_factory.h" 19 #include "net/url_request/url_request_job_factory.h"
19 20
20 class GURL; 21 class GURL;
21 22
22 namespace base { 23 namespace base {
23 class RefCountedMemory; 24 class RefCountedMemory;
24 } 25 }
25 26
(...skipping 19 matching lines...) Expand all
45 // be set for incognito profiles. Called on the UI thread. 46 // be set for incognito profiles. Called on the UI thread.
46 CONTENT_EXPORT static std::unique_ptr< 47 CONTENT_EXPORT static std::unique_ptr<
47 net::URLRequestJobFactory::ProtocolHandler> 48 net::URLRequestJobFactory::ProtocolHandler>
48 CreateProtocolHandler(content::ResourceContext* resource_context, 49 CreateProtocolHandler(content::ResourceContext* resource_context,
49 bool is_incognito, 50 bool is_incognito,
50 ChromeBlobStorageContext* blob_storage_context); 51 ChromeBlobStorageContext* blob_storage_context);
51 52
52 // Adds a DataSource to the collection of data sources. 53 // Adds a DataSource to the collection of data sources.
53 void AddDataSource(URLDataSourceImpl* source); 54 void AddDataSource(URLDataSourceImpl* source);
54 55
56 void UpdateWebUIDataSource(const std::string& source_name,
57 const base::DictionaryValue& update);
58
55 // DataSource invokes this. Sends the data to the URLRequest. |bytes| may be 59 // DataSource invokes this. Sends the data to the URLRequest. |bytes| may be
56 // null, which signals an error handling the request. 60 // null, which signals an error handling the request.
57 void DataAvailable(RequestID request_id, base::RefCountedMemory* bytes); 61 void DataAvailable(RequestID request_id, base::RefCountedMemory* bytes);
58 62
59 static net::URLRequestJob* Factory(net::URLRequest* request, 63 static net::URLRequestJob* Factory(net::URLRequest* request,
60 const std::string& scheme); 64 const std::string& scheme);
61 65
62 private: 66 private:
63 friend class URLRequestChromeJob; 67 friend class URLRequestChromeJob;
64 68
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 112
109 // Creates protocol handler for chrome-devtools://. |is_incognito| should be 113 // Creates protocol handler for chrome-devtools://. |is_incognito| should be
110 // set for incognito profiles. 114 // set for incognito profiles.
111 net::URLRequestJobFactory::ProtocolHandler* 115 net::URLRequestJobFactory::ProtocolHandler*
112 CreateDevToolsProtocolHandler(content::ResourceContext* resource_context, 116 CreateDevToolsProtocolHandler(content::ResourceContext* resource_context,
113 bool is_incognito); 117 bool is_incognito);
114 118
115 } // namespace content 119 } // namespace content
116 120
117 #endif // CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_ 121 #endif // CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698