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

Side by Side Diff: chrome/browser/supervised_user/child_accounts/family_info_fetcher_unittest.cc

Issue 1878143002: Convert //chrome/browser/supervised_user from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/supervised_user/child_accounts/family_info_fetcher.h"
6
5 #include <stddef.h> 7 #include <stddef.h>
6 8
9 #include <memory>
7 #include <string> 10 #include <string>
8 #include <vector> 11 #include <vector>
9 12
10 #include "base/json/json_writer.h" 13 #include "base/json/json_writer.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
13 #include "base/thread_task_runner_handle.h" 15 #include "base/thread_task_runner_handle.h"
14 #include "base/values.h" 16 #include "base/values.h"
15 #include "chrome/browser/supervised_user/child_accounts/family_info_fetcher.h"
16 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" 17 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h"
17 #include "net/base/net_errors.h" 18 #include "net/base/net_errors.h"
18 #include "net/url_request/test_url_fetcher_factory.h" 19 #include "net/url_request/test_url_fetcher_factory.h"
19 #include "net/url_request/url_request_test_util.h" 20 #include "net/url_request/url_request_test_util.h"
20 #include "testing/gmock/include/gmock/gmock.h" 21 #include "testing/gmock/include/gmock/gmock.h"
21 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
22 23
23 const char kAccountId[] = "user@gmail.com"; 24 const char kAccountId[] = "user@gmail.com";
24 const char kDifferentAccountId[] = "some_other_user@gmail.com"; 25 const char kDifferentAccountId[] = "some_other_user@gmail.com";
25 const int kFamilyInfoFetcherURLFetcherID = 0; 26 const int kFamilyInfoFetcherURLFetcherID = 0;
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 IssueRefreshToken(); 312 IssueRefreshToken();
312 313
313 fetcher_.StartGetFamilyProfile(); 314 fetcher_.StartGetFamilyProfile();
314 315
315 IssueAccessToken(); 316 IssueAccessToken();
316 317
317 // Failed API call should result in a network error. 318 // Failed API call should result in a network error.
318 EXPECT_CALL(*this, OnFailure(FamilyInfoFetcher::NETWORK_ERROR)); 319 EXPECT_CALL(*this, OnFailure(FamilyInfoFetcher::NETWORK_ERROR));
319 SendFailedResponse(); 320 SendFailedResponse();
320 } 321 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698