OLD | NEW |
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 "components/gcm_driver/gcm_client_impl.h" | 5 #include "components/gcm_driver/gcm_client_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <initializer_list> | 9 #include <initializer_list> |
10 #include <memory> | 10 #include <memory> |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 } | 357 } |
358 const std::vector<AccountMapping>& last_account_mappings() { | 358 const std::vector<AccountMapping>& last_account_mappings() { |
359 return last_account_mappings_; | 359 return last_account_mappings_; |
360 } | 360 } |
361 | 361 |
362 const GServicesSettings& gservices_settings() const { | 362 const GServicesSettings& gservices_settings() const { |
363 return gcm_client_->gservices_settings_; | 363 return gcm_client_->gservices_settings_; |
364 } | 364 } |
365 | 365 |
366 const base::FilePath& temp_directory_path() const { | 366 const base::FilePath& temp_directory_path() const { |
367 return temp_directory_.path(); | 367 return temp_directory_.GetPath(); |
368 } | 368 } |
369 | 369 |
370 base::FilePath gcm_store_path() const { | 370 base::FilePath gcm_store_path() const { |
371 // Pass an non-existent directory as store path to match the exact | 371 // Pass an non-existent directory as store path to match the exact |
372 // behavior in the production code. Currently GCMStoreImpl checks if | 372 // behavior in the production code. Currently GCMStoreImpl checks if |
373 // the directory exist or not to determine the store existence. | 373 // the directory exist or not to determine the store existence. |
374 return temp_directory_.path().Append(FILE_PATH_LITERAL("GCM Store")); | 374 return temp_directory_.GetPath().Append(FILE_PATH_LITERAL("GCM Store")); |
375 } | 375 } |
376 | 376 |
377 int64_t CurrentTime(); | 377 int64_t CurrentTime(); |
378 | 378 |
379 // Tooling. | 379 // Tooling. |
380 void PumpLoopUntilIdle(); | 380 void PumpLoopUntilIdle(); |
381 bool CreateUniqueTempDir(); | 381 bool CreateUniqueTempDir(); |
382 AutoAdvancingTestClock* clock() const { | 382 AutoAdvancingTestClock* clock() const { |
383 return reinterpret_cast<AutoAdvancingTestClock*>(gcm_client_->clock_.get()); | 383 return reinterpret_cast<AutoAdvancingTestClock*>(gcm_client_->clock_.get()); |
384 } | 384 } |
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1828 ReceiveMessageFromMCS(message); | 1828 ReceiveMessageFromMCS(message); |
1829 | 1829 |
1830 EXPECT_EQ(MESSAGE_RECEIVED, last_event()); | 1830 EXPECT_EQ(MESSAGE_RECEIVED, last_event()); |
1831 EXPECT_EQ(kExtensionAppId, last_app_id()); | 1831 EXPECT_EQ(kExtensionAppId, last_app_id()); |
1832 EXPECT_EQ(expected_data.size(), last_message().data.size()); | 1832 EXPECT_EQ(expected_data.size(), last_message().data.size()); |
1833 EXPECT_EQ(expected_data, last_message().data); | 1833 EXPECT_EQ(expected_data, last_message().data); |
1834 EXPECT_EQ(kSender, last_message().sender_id); | 1834 EXPECT_EQ(kSender, last_message().sender_id); |
1835 } | 1835 } |
1836 | 1836 |
1837 } // namespace gcm | 1837 } // namespace gcm |
OLD | NEW |