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/version.h" | 8 #include "base/version.h" |
9 #include "chrome/browser/app_mode/app_mode_utils.h" | 9 #include "chrome/browser/app_mode/app_mode_utils.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 | 300 |
301 bool ChromeExtensionsBrowserClient::IsBackgroundUpdateAllowed() { | 301 bool ChromeExtensionsBrowserClient::IsBackgroundUpdateAllowed() { |
302 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 302 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
303 switches::kDisableBackgroundNetworking); | 303 switches::kDisableBackgroundNetworking); |
304 } | 304 } |
305 | 305 |
306 bool ChromeExtensionsBrowserClient::IsMinBrowserVersionSupported( | 306 bool ChromeExtensionsBrowserClient::IsMinBrowserVersionSupported( |
307 const std::string& min_version) { | 307 const std::string& min_version) { |
308 base::Version browser_version = | 308 base::Version browser_version = |
309 base::Version(version_info::GetVersionNumber()); | 309 base::Version(version_info::GetVersionNumber()); |
310 Version browser_min_version(min_version); | 310 base::Version browser_min_version(min_version); |
311 if (browser_version.IsValid() && browser_min_version.IsValid() && | 311 if (browser_version.IsValid() && browser_min_version.IsValid() && |
312 browser_min_version.CompareTo(browser_version) > 0) { | 312 browser_min_version.CompareTo(browser_version) > 0) { |
313 return false; | 313 return false; |
314 } | 314 } |
315 return true; | 315 return true; |
316 } | 316 } |
317 | 317 |
318 ExtensionWebContentsObserver* | 318 ExtensionWebContentsObserver* |
319 ChromeExtensionsBrowserClient::GetExtensionWebContentsObserver( | 319 ChromeExtensionsBrowserClient::GetExtensionWebContentsObserver( |
320 content::WebContents* web_contents) { | 320 content::WebContents* web_contents) { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 // locations, and they must be ignored here. | 364 // locations, and they must be ignored here. |
365 return; | 365 return; |
366 | 366 |
367 case VIEW_TYPE_INVALID: | 367 case VIEW_TYPE_INVALID: |
368 NOTREACHED(); | 368 NOTREACHED(); |
369 return; | 369 return; |
370 } | 370 } |
371 } | 371 } |
372 | 372 |
373 } // namespace extensions | 373 } // namespace extensions |
OLD | NEW |