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

Unified Diff: content/browser/geolocation/arbitrator_dependency_factory.h

Issue 6597044: Revert 76228 - Move core pieces of geolocation from chrome to content.This is... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/geolocation/arbitrator_dependency_factory.h
===================================================================
--- content/browser/geolocation/arbitrator_dependency_factory.h (revision 76230)
+++ content/browser/geolocation/arbitrator_dependency_factory.h (working copy)
@@ -1,61 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_BROWSER_GEOLOCATION_ARBITRATOR_DEPENDENCY_FACTORY_H_
-#define CONTENT_BROWSER_GEOLOCATION_ARBITRATOR_DEPENDENCY_FACTORY_H_
-#pragma once
-
-#include "base/ref_counted.h"
-#include "base/string16.h"
-
-class AccessTokenStore;
-class GURL;
-class LocationProviderBase;
-class URLRequestContextGetter;
-
-namespace base {
-class Time;
-}
-
-// Allows injection of factory methods for creating the location providers.
-// RefCounted for simplicity of writing tests.
-class GeolocationArbitratorDependencyFactory
- : public base::RefCounted<GeolocationArbitratorDependencyFactory> {
- public:
- // Defines a function that returns the current time.
- typedef base::Time (*GetTimeNow)();
-
- virtual GetTimeNow GetTimeFunction() = 0;
- virtual URLRequestContextGetter* GetContextGetter() = 0;
- virtual AccessTokenStore* NewAccessTokenStore() = 0;
- virtual LocationProviderBase* NewNetworkLocationProvider(
- AccessTokenStore* access_token_store,
- URLRequestContextGetter* context,
- const GURL& url,
- const string16& access_token) = 0;
- virtual LocationProviderBase* NewSystemLocationProvider() = 0;
-
- protected:
- friend class base::RefCounted<GeolocationArbitratorDependencyFactory>;
- virtual ~GeolocationArbitratorDependencyFactory();
-};
-
-// The default dependency factory, exposed so that it is possible
-// to override only certain parts (e.g. the location providers).
-class DefaultGeolocationArbitratorDependencyFactory
- : public GeolocationArbitratorDependencyFactory {
- public:
- // GeolocationArbitratorDependencyFactory
- virtual URLRequestContextGetter* GetContextGetter();
- virtual GetTimeNow GetTimeFunction();
- virtual AccessTokenStore* NewAccessTokenStore();
- virtual LocationProviderBase* NewNetworkLocationProvider(
- AccessTokenStore* access_token_store,
- URLRequestContextGetter* context,
- const GURL& url,
- const string16& access_token);
- virtual LocationProviderBase* NewSystemLocationProvider();
-};
-
-#endif // CONTENT_BROWSER_GEOLOCATION_ARBITRATOR_DEPENDENCY_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698