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

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 312333005: Make the "Tabs" item on about:sync non-yellow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/profile_sync_service.h" 5 #include "chrome/browser/sync/profile_sync_service.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #include "components/sync_driver/pref_names.h" 70 #include "components/sync_driver/pref_names.h"
71 #include "components/sync_driver/system_encryptor.h" 71 #include "components/sync_driver/system_encryptor.h"
72 #include "components/sync_driver/user_selectable_sync_type.h" 72 #include "components/sync_driver/user_selectable_sync_type.h"
73 #include "content/public/browser/notification_details.h" 73 #include "content/public/browser/notification_details.h"
74 #include "content/public/browser/notification_service.h" 74 #include "content/public/browser/notification_service.h"
75 #include "content/public/browser/notification_source.h" 75 #include "content/public/browser/notification_source.h"
76 #include "grit/generated_resources.h" 76 #include "grit/generated_resources.h"
77 #include "net/cookies/cookie_monster.h" 77 #include "net/cookies/cookie_monster.h"
78 #include "net/url_request/url_request_context_getter.h" 78 #include "net/url_request/url_request_context_getter.h"
79 #include "sync/api/sync_error.h" 79 #include "sync/api/sync_error.h"
80 #include "sync/internal_api/public/base/model_type.h"
80 #include "sync/internal_api/public/configure_reason.h" 81 #include "sync/internal_api/public/configure_reason.h"
81 #include "sync/internal_api/public/http_bridge_network_resources.h" 82 #include "sync/internal_api/public/http_bridge_network_resources.h"
82 #include "sync/internal_api/public/network_resources.h" 83 #include "sync/internal_api/public/network_resources.h"
83 #include "sync/internal_api/public/sessions/type_debug_info_observer.h" 84 #include "sync/internal_api/public/sessions/type_debug_info_observer.h"
84 #include "sync/internal_api/public/sync_core_proxy.h" 85 #include "sync/internal_api/public/sync_core_proxy.h"
85 #include "sync/internal_api/public/sync_encryption_handler.h" 86 #include "sync/internal_api/public/sync_encryption_handler.h"
86 #include "sync/internal_api/public/util/experiments.h" 87 #include "sync/internal_api/public/util/experiments.h"
87 #include "sync/internal_api/public/util/sync_string_conversions.h" 88 #include "sync/internal_api/public/util/sync_string_conversions.h"
88 #include "sync/js/js_event_details.h" 89 #include "sync/js/js_event_details.h"
89 #include "sync/util/cryptographer.h" 90 #include "sync/util/cryptographer.h"
(...skipping 1885 matching lines...) Expand 10 before | Expand all | Expand 10 after
1975 const syncer::SyncError &error = error_map.find(type)->second; 1976 const syncer::SyncError &error = error_map.find(type)->second;
1976 DCHECK(error.IsSet()); 1977 DCHECK(error.IsSet());
1977 std::string error_text = "Error: " + error.location().ToString() + 1978 std::string error_text = "Error: " + error.location().ToString() +
1978 ", " + error.message(); 1979 ", " + error.message();
1979 type_status->SetString("status", "error"); 1980 type_status->SetString("status", "error");
1980 type_status->SetString("value", error_text); 1981 type_status->SetString("value", error_text);
1981 } else if (throttled_types.Has(type) && passive_types.Has(type)) { 1982 } else if (throttled_types.Has(type) && passive_types.Has(type)) {
1982 type_status->SetString("status", "warning"); 1983 type_status->SetString("status", "warning");
1983 type_status->SetString("value", "Passive, Throttled"); 1984 type_status->SetString("value", "Passive, Throttled");
1984 } else if (passive_types.Has(type)) { 1985 } else if (passive_types.Has(type)) {
1985 type_status->SetString("status", "warning"); 1986 // Set status to ok for a passive proxy type (which is always passive);
rlarocque 2014/06/05 21:21:11 nit: I would rephrase this so that the check for p
stanisc 2014/06/06 01:15:44 Done.
1987 // otherwise treat that as a warning.
1988 if (type >= syncer::FIRST_PROXY_TYPE && type <= syncer::LAST_PROXY_TYPE) {
rlarocque 2014/06/05 21:21:11 Is there no IsProxyType() helper function in model
stanisc 2014/06/06 01:15:44 I searched for FIRST_PROXY_TYPE and LAST_PROXY_TYP
stanisc 2014/06/06 01:15:44 Done.
1989 type_status->SetString("status", "ok");
1990 } else {
1991 type_status->SetString("status", "warning");
1992 }
1986 type_status->SetString("value", "Passive"); 1993 type_status->SetString("value", "Passive");
1987 } else if (throttled_types.Has(type)) { 1994 } else if (throttled_types.Has(type)) {
1988 type_status->SetString("status", "warning"); 1995 type_status->SetString("status", "warning");
1989 type_status->SetString("value", "Throttled"); 1996 type_status->SetString("value", "Throttled");
1990 } else if (GetRegisteredNonBlockingDataTypes().Has(type)) { 1997 } else if (GetRegisteredNonBlockingDataTypes().Has(type)) {
1991 type_status->SetString("status", "ok"); 1998 type_status->SetString("status", "ok");
1992 type_status->SetString("value", "Non-Blocking"); 1999 type_status->SetString("value", "Non-Blocking");
1993 } else if (active_types.Has(type)) { 2000 } else if (active_types.Has(type)) {
1994 type_status->SetString("status", "ok"); 2001 type_status->SetString("status", "ok");
1995 type_status->SetString("value", "Active: " + 2002 type_status->SetString("value", "Active: " +
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
2468 network_resources_ = network_resources.Pass(); 2475 network_resources_ = network_resources.Pass();
2469 } 2476 }
2470 2477
2471 bool ProfileSyncService::HasSyncingBackend() const { 2478 bool ProfileSyncService::HasSyncingBackend() const {
2472 return backend_mode_ != SYNC ? false : backend_ != NULL; 2479 return backend_mode_ != SYNC ? false : backend_ != NULL;
2473 } 2480 }
2474 2481
2475 void ProfileSyncService::SetBackupStartDelayForTest(base::TimeDelta delay) { 2482 void ProfileSyncService::SetBackupStartDelayForTest(base::TimeDelta delay) {
2476 backup_start_delay_ = delay; 2483 backup_start_delay_ = delay;
2477 } 2484 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698