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

Side by Side Diff: chrome/browser/sync/test/integration/profile_sync_service_harness.cc

Issue 2354613002: [Sync] Fix namespaces for the browser_sync component. (Closed)
Patch Set: Self-review. Created 4 years, 3 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/sync/test/integration/profile_sync_service_harness.h" 5 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <iterator> 8 #include <iterator>
9 #include <ostream> 9 #include <ostream>
10 #include <sstream> 10 #include <sstream>
(...skipping 15 matching lines...) Expand all
26 #include "chrome/common/chrome_switches.h" 26 #include "chrome/common/chrome_switches.h"
27 #include "components/browser_sync/profile_sync_service.h" 27 #include "components/browser_sync/profile_sync_service.h"
28 #include "components/invalidation/impl/p2p_invalidation_service.h" 28 #include "components/invalidation/impl/p2p_invalidation_service.h"
29 #include "components/signin/core/browser/profile_oauth2_token_service.h" 29 #include "components/signin/core/browser/profile_oauth2_token_service.h"
30 #include "components/signin/core/browser/signin_manager_base.h" 30 #include "components/signin/core/browser/signin_manager_base.h"
31 #include "components/sync/base/progress_marker_map.h" 31 #include "components/sync/base/progress_marker_map.h"
32 #include "components/sync/driver/about_sync_util.h" 32 #include "components/sync/driver/about_sync_util.h"
33 #include "components/sync/engine/sync_string_conversions.h" 33 #include "components/sync/engine/sync_string_conversions.h"
34 #include "google_apis/gaia/gaia_constants.h" 34 #include "google_apis/gaia/gaia_constants.h"
35 35
36 using browser_sync::ProfileSyncService;
36 using syncer::SyncCycleSnapshot; 37 using syncer::SyncCycleSnapshot;
37 38
38 namespace { 39 namespace {
39 40
skym 2016/09/22 17:25:58 Unbalanced newlines here look odd.
maxbogue 2016/09/22 19:41:14 That's because you're reading it wrong :P
40 std::string GetGaiaIdForUsername(const std::string& username) { 41 std::string GetGaiaIdForUsername(const std::string& username) {
41 return "gaia-id-" + username; 42 return "gaia-id-" + username;
42 } 43 }
skym 2016/09/22 17:25:58 Closing namespace comment?
maxbogue 2016/09/22 19:41:14 This is the function close brace. The namespace cl
43 44
44 bool HasAuthError(ProfileSyncService* service) { 45 bool HasAuthError(ProfileSyncService* service) {
45 return service->GetAuthError().state() == 46 return service->GetAuthError().state() ==
46 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS || 47 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS ||
47 service->GetAuthError().state() == 48 service->GetAuthError().state() ==
48 GoogleServiceAuthError::SERVICE_ERROR || 49 GoogleServiceAuthError::SERVICE_ERROR ||
49 service->GetAuthError().state() == 50 service->GetAuthError().state() ==
50 GoogleServiceAuthError::REQUEST_CANCELED; 51 GoogleServiceAuthError::REQUEST_CANCELED;
51 } 52 }
52 53
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 475
475 std::string ProfileSyncServiceHarness::GetServiceStatus() { 476 std::string ProfileSyncServiceHarness::GetServiceStatus() {
476 std::unique_ptr<base::DictionaryValue> value( 477 std::unique_ptr<base::DictionaryValue> value(
477 sync_driver::sync_ui_util::ConstructAboutInformation( 478 sync_driver::sync_ui_util::ConstructAboutInformation(
478 service(), service()->signin(), chrome::GetChannel())); 479 service(), service()->signin(), chrome::GetChannel()));
479 std::string service_status; 480 std::string service_status;
480 base::JSONWriter::WriteWithOptions( 481 base::JSONWriter::WriteWithOptions(
481 *value, base::JSONWriter::OPTIONS_PRETTY_PRINT, &service_status); 482 *value, base::JSONWriter::OPTIONS_PRETTY_PRINT, &service_status);
482 return service_status; 483 return service_status;
483 } 484 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698