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

Side by Side Diff: chrome/browser/extensions/chrome_extensions_browser_client.cc

Issue 2259383002: Consistently use namespaced base::Version in extensions code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 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 <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 bool ChromeExtensionsBrowserClient::IsBackgroundUpdateAllowed() { 319 bool ChromeExtensionsBrowserClient::IsBackgroundUpdateAllowed() {
320 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 320 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
321 switches::kDisableBackgroundNetworking); 321 switches::kDisableBackgroundNetworking);
322 } 322 }
323 323
324 bool ChromeExtensionsBrowserClient::IsMinBrowserVersionSupported( 324 bool ChromeExtensionsBrowserClient::IsMinBrowserVersionSupported(
325 const std::string& min_version) { 325 const std::string& min_version) {
326 base::Version browser_version = 326 base::Version browser_version =
327 base::Version(version_info::GetVersionNumber()); 327 base::Version(version_info::GetVersionNumber());
328 Version browser_min_version(min_version); 328 base::Version browser_min_version(min_version);
329 if (browser_version.IsValid() && browser_min_version.IsValid() && 329 if (browser_version.IsValid() && browser_min_version.IsValid() &&
330 browser_min_version.CompareTo(browser_version) > 0) { 330 browser_min_version.CompareTo(browser_version) > 0) {
331 return false; 331 return false;
332 } 332 }
333 return true; 333 return true;
334 } 334 }
335 335
336 ExtensionWebContentsObserver* 336 ExtensionWebContentsObserver*
337 ChromeExtensionsBrowserClient::GetExtensionWebContentsObserver( 337 ChromeExtensionsBrowserClient::GetExtensionWebContentsObserver(
338 content::WebContents* web_contents) { 338 content::WebContents* web_contents) {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 new ChromeExtensionBluetoothChooser(frame, event_handler)); 411 new ChromeExtensionBluetoothChooser(frame, event_handler));
412 } 412 }
413 413
414 bool ChromeExtensionsBrowserClient::IsActivityLoggingEnabled( 414 bool ChromeExtensionsBrowserClient::IsActivityLoggingEnabled(
415 content::BrowserContext* context) { 415 content::BrowserContext* context) {
416 ActivityLog* activity_log = ActivityLog::GetInstance(context); 416 ActivityLog* activity_log = ActivityLog::GetInstance(context);
417 return activity_log && activity_log->is_active(); 417 return activity_log && activity_log->is_active();
418 } 418 }
419 419
420 } // namespace extensions 420 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698