Remove use of absl::make_unique
authorBrennan Saeta <saeta@google.com>
Sat, 2 Jun 2018 01:00:43 +0000 (18:00 -0700)
committerGunhan Gulsoy <gunan@google.com>
Tue, 5 Jun 2018 03:39:49 +0000 (20:39 -0700)
absl is not yet ready for use by open source TensorFlow. :-(

PiperOrigin-RevId: 198952953

tensorflow/contrib/cloud/kernels/gcs_config_ops.cc

index ef49982..648a219 100644 (file)
@@ -21,6 +21,7 @@ limitations under the License.
 #include "tensorflow/core/platform/cloud/curl_http_request.h"
 #include "tensorflow/core/platform/cloud/gcs_file_system.h"
 #include "tensorflow/core/platform/cloud/oauth_client.h"
+#include "tensorflow/core/util/ptr_util.h"
 
 namespace tensorflow {
 namespace {
@@ -96,7 +97,8 @@ class GcsCredentialsOpKernel : public OpKernel {
         errors::InvalidArgument("JSON format incompatible; did not find fields "
                                 "`refresh_token` or `private_key`."));
 
-    auto provider = absl::make_unique<ConstantAuthProvider>(json, ctx->env());
+    auto provider =
+        tensorflow::MakeUnique<ConstantAuthProvider>(json, ctx->env());
 
     // Test getting a token
     string dummy_token;
@@ -121,7 +123,7 @@ class GcsCredentialsOpKernel : public OpKernel {
           initial_retry_delay_usec_(initial_retry_delay_usec) {}
 
     ConstantAuthProvider(const Json::Value& json, Env* env)
-        : ConstantAuthProvider(json, absl::make_unique<OAuthClient>(), env,
+        : ConstantAuthProvider(json, tensorflow::MakeUnique<OAuthClient>(), env,
                                kInitialRetryDelayUsec) {}
 
     ~ConstantAuthProvider() override {}