OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/extensions/chrome_extensions_browser_client.h" | 5 #include "chrome/browser/extensions/chrome_extensions_browser_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/version.h" | 9 #include "base/version.h" |
10 #include "chrome/browser/app_mode/app_mode_utils.h" | 10 #include "chrome/browser/app_mode/app_mode_utils.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 if (!extension_cache_.get()) { | 274 if (!extension_cache_.get()) { |
275 #if defined(OS_CHROMEOS) | 275 #if defined(OS_CHROMEOS) |
276 extension_cache_.reset(new ExtensionCacheImpl()); | 276 extension_cache_.reset(new ExtensionCacheImpl()); |
277 #else | 277 #else |
278 extension_cache_.reset(new NullExtensionCache()); | 278 extension_cache_.reset(new NullExtensionCache()); |
279 #endif | 279 #endif |
280 } | 280 } |
281 return extension_cache_.get(); | 281 return extension_cache_.get(); |
282 } | 282 } |
283 | 283 |
| 284 bool ChromeExtensionsBrowserClient::IsBackgroundUpdateAllowed() { |
| 285 return !CommandLine::ForCurrentProcess()->HasSwitch( |
| 286 switches::kDisableBackgroundNetworking); |
| 287 } |
| 288 |
| 289 bool ChromeExtensionsBrowserClient::IsMinBrowserVersionSupported( |
| 290 const std::string& min_version) { |
| 291 chrome::VersionInfo version_info; |
| 292 base::Version browser_version = base::Version(version_info.Version()); |
| 293 Version browser_min_version(min_version); |
| 294 if (browser_version.IsValid() && browser_min_version.IsValid() && |
| 295 browser_min_version.CompareTo(browser_version) > 0) { |
| 296 return false; |
| 297 } |
| 298 return true; |
| 299 } |
| 300 |
284 } // namespace extensions | 301 } // namespace extensions |
OLD | NEW |