| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "blimp/engine/common/blimp_browser_context.h" | 5 #include "blimp/engine/common/blimp_browser_context.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/environment.h" | 8 #include "base/environment.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/nix/xdg_util.h" | 10 #include "base/nix/xdg_util.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 } | 69 } |
| 70 | 70 |
| 71 void BlimpBrowserContext::InitWhileIOAllowed() { | 71 void BlimpBrowserContext::InitWhileIOAllowed() { |
| 72 // Ensures ~/.config/blimp_engine directory exists. | 72 // Ensures ~/.config/blimp_engine directory exists. |
| 73 scoped_ptr<base::Environment> env(base::Environment::Create()); | 73 scoped_ptr<base::Environment> env(base::Environment::Create()); |
| 74 base::FilePath config_dir(base::nix::GetXDGDirectory( | 74 base::FilePath config_dir(base::nix::GetXDGDirectory( |
| 75 env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir)); | 75 env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir)); |
| 76 path_ = config_dir.Append("blimp_engine"); | 76 path_ = config_dir.Append("blimp_engine"); |
| 77 if (!base::PathExists(path_)) | 77 if (!base::PathExists(path_)) |
| 78 base::CreateDirectory(path_); | 78 base::CreateDirectory(path_); |
| 79 BrowserContext::Initialize(this, path_); |
| 79 } | 80 } |
| 80 | 81 |
| 81 scoped_ptr<content::ZoomLevelDelegate> | 82 scoped_ptr<content::ZoomLevelDelegate> |
| 82 BlimpBrowserContext::CreateZoomLevelDelegate(const base::FilePath&) { | 83 BlimpBrowserContext::CreateZoomLevelDelegate(const base::FilePath&) { |
| 83 return nullptr; | 84 return nullptr; |
| 84 } | 85 } |
| 85 | 86 |
| 86 base::FilePath BlimpBrowserContext::GetPath() const { | 87 base::FilePath BlimpBrowserContext::GetPath() const { |
| 87 return path_; | 88 return path_; |
| 88 } | 89 } |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 return permission_manager_.get(); | 166 return permission_manager_.get(); |
| 166 } | 167 } |
| 167 | 168 |
| 168 content::BackgroundSyncController* | 169 content::BackgroundSyncController* |
| 169 BlimpBrowserContext::GetBackgroundSyncController() { | 170 BlimpBrowserContext::GetBackgroundSyncController() { |
| 170 return nullptr; | 171 return nullptr; |
| 171 } | 172 } |
| 172 | 173 |
| 173 } // namespace engine | 174 } // namespace engine |
| 174 } // namespace blimp | 175 } // namespace blimp |
| OLD | NEW |