OLD | NEW |
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/browser/cast_browser_context.h" | 5 #include "chromecast/browser/cast_browser_context.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 if (!base::PathExists(path_)) | 71 if (!base::PathExists(path_)) |
72 base::CreateDirectory(path_); | 72 base::CreateDirectory(path_); |
73 #else | 73 #else |
74 // Chromecast doesn't support user profiles nor does it have | 74 // Chromecast doesn't support user profiles nor does it have |
75 // incognito mode. This means that all of the persistent | 75 // incognito mode. This means that all of the persistent |
76 // data (currently only cookies and local storage) will be | 76 // data (currently only cookies and local storage) will be |
77 // shared in a single location as defined here. | 77 // shared in a single location as defined here. |
78 CHECK(PathService::Get(DIR_CAST_HOME, &path_)); | 78 CHECK(PathService::Get(DIR_CAST_HOME, &path_)); |
79 #endif // defined(OS_ANDROID) | 79 #endif // defined(OS_ANDROID) |
| 80 BrowserContext::Initialize(this, path_); |
80 } | 81 } |
81 | 82 |
82 scoped_ptr<content::ZoomLevelDelegate> | 83 scoped_ptr<content::ZoomLevelDelegate> |
83 CastBrowserContext::CreateZoomLevelDelegate( | 84 CastBrowserContext::CreateZoomLevelDelegate( |
84 const base::FilePath& partition_path) { | 85 const base::FilePath& partition_path) { |
85 return nullptr; | 86 return nullptr; |
86 } | 87 } |
87 | 88 |
88 base::FilePath CastBrowserContext::GetPath() const { | 89 base::FilePath CastBrowserContext::GetPath() const { |
89 return path_; | 90 return path_; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 return permission_manager_.get(); | 154 return permission_manager_.get(); |
154 } | 155 } |
155 | 156 |
156 content::BackgroundSyncController* | 157 content::BackgroundSyncController* |
157 CastBrowserContext::GetBackgroundSyncController() { | 158 CastBrowserContext::GetBackgroundSyncController() { |
158 return nullptr; | 159 return nullptr; |
159 } | 160 } |
160 | 161 |
161 } // namespace shell | 162 } // namespace shell |
162 } // namespace chromecast | 163 } // namespace chromecast |
OLD | NEW |