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

Side by Side Diff: chromecast/shell/browser/cast_browser_context.cc

Issue 602593004: Chromecast: disables downloads from the Chromecast shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chromecast/shell/browser/cast_browser_context.h" 5 #include "chromecast/shell/browser/cast_browser_context.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "chromecast/common/cast_paths.h" 10 #include "chromecast/common/cast_paths.h"
11 #include "chromecast/shell/browser/cast_download_manager_delegate.h"
11 #include "chromecast/shell/browser/url_request_context_factory.h" 12 #include "chromecast/shell/browser/url_request_context_factory.h"
12 #include "content/public/browser/browser_thread.h" 13 #include "content/public/browser/browser_thread.h"
13 #include "content/public/browser/resource_context.h" 14 #include "content/public/browser/resource_context.h"
14 #include "content/public/browser/storage_partition.h" 15 #include "content/public/browser/storage_partition.h"
15 #include "content/public/common/content_switches.h" 16 #include "content/public/common/content_switches.h"
16 #include "net/url_request/url_request_context.h" 17 #include "net/url_request/url_request_context.h"
17 #include "net/url_request/url_request_context_getter.h" 18 #include "net/url_request/url_request_context_getter.h"
18 19
19 namespace chromecast { 20 namespace chromecast {
20 namespace shell { 21 namespace shell {
(...skipping 19 matching lines...) Expand all
40 41
41 private: 42 private:
42 URLRequestContextFactory* url_request_context_factory_; 43 URLRequestContextFactory* url_request_context_factory_;
43 44
44 DISALLOW_COPY_AND_ASSIGN(CastResourceContext); 45 DISALLOW_COPY_AND_ASSIGN(CastResourceContext);
45 }; 46 };
46 47
47 CastBrowserContext::CastBrowserContext( 48 CastBrowserContext::CastBrowserContext(
48 URLRequestContextFactory* url_request_context_factory) 49 URLRequestContextFactory* url_request_context_factory)
49 : url_request_context_factory_(url_request_context_factory), 50 : url_request_context_factory_(url_request_context_factory),
50 resource_context_(new CastResourceContext(url_request_context_factory)) { 51 resource_context_(new CastResourceContext(url_request_context_factory)),
52 download_manager_delegate_(new CastDownloadManagerDelegate()) {
51 InitWhileIOAllowed(); 53 InitWhileIOAllowed();
52 } 54 }
53 55
54 CastBrowserContext::~CastBrowserContext() { 56 CastBrowserContext::~CastBrowserContext() {
55 content::BrowserThread::DeleteSoon( 57 content::BrowserThread::DeleteSoon(
56 content::BrowserThread::IO, 58 content::BrowserThread::IO,
57 FROM_HERE, 59 FROM_HERE,
58 resource_context_.release()); 60 resource_context_.release());
59 } 61 }
60 62
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const base::FilePath& partition_path, bool in_memory) { 100 const base::FilePath& partition_path, bool in_memory) {
99 return GetMediaRequestContext(); 101 return GetMediaRequestContext();
100 } 102 }
101 103
102 content::ResourceContext* CastBrowserContext::GetResourceContext() { 104 content::ResourceContext* CastBrowserContext::GetResourceContext() {
103 return resource_context_.get(); 105 return resource_context_.get();
104 } 106 }
105 107
106 content::DownloadManagerDelegate* 108 content::DownloadManagerDelegate*
107 CastBrowserContext::GetDownloadManagerDelegate() { 109 CastBrowserContext::GetDownloadManagerDelegate() {
108 NOTIMPLEMENTED(); 110 return download_manager_delegate_.get();
109 return NULL;
110 } 111 }
111 112
112 content::BrowserPluginGuestManager* CastBrowserContext::GetGuestManager() { 113 content::BrowserPluginGuestManager* CastBrowserContext::GetGuestManager() {
113 NOTIMPLEMENTED(); 114 NOTIMPLEMENTED();
114 return NULL; 115 return NULL;
115 } 116 }
116 117
117 storage::SpecialStoragePolicy* CastBrowserContext::GetSpecialStoragePolicy() { 118 storage::SpecialStoragePolicy* CastBrowserContext::GetSpecialStoragePolicy() {
118 NOTIMPLEMENTED(); 119 NOTIMPLEMENTED();
119 return NULL; 120 return NULL;
120 } 121 }
121 122
122 content::PushMessagingService* CastBrowserContext::GetPushMessagingService() { 123 content::PushMessagingService* CastBrowserContext::GetPushMessagingService() {
123 NOTIMPLEMENTED(); 124 NOTIMPLEMENTED();
124 return NULL; 125 return NULL;
125 } 126 }
126 127
127 content::SSLHostStateDelegate* CastBrowserContext::GetSSLHostStateDelegate() { 128 content::SSLHostStateDelegate* CastBrowserContext::GetSSLHostStateDelegate() {
128 NOTIMPLEMENTED(); 129 NOTIMPLEMENTED();
129 return NULL; 130 return NULL;
130 } 131 }
131 132
132 } // namespace shell 133 } // namespace shell
133 } // namespace chromecast 134 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/shell/browser/cast_browser_context.h ('k') | chromecast/shell/browser/cast_download_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698