| Index: sync/sessions/sync_session_context.h | 
| diff --git a/sync/sessions/sync_session_context.h b/sync/sessions/sync_session_context.h | 
| index b694162c15637e046d1997f51d0d8bcde6d42cb2..76170958eccec5441e4a937cfaaafadffec8765a 100644 | 
| --- a/sync/sessions/sync_session_context.h | 
| +++ b/sync/sessions/sync_session_context.h | 
| @@ -55,6 +55,7 @@ class SYNC_EXPORT_PRIVATE SyncSessionContext { | 
| DebugInfoGetter* debug_info_getter, | 
| TrafficRecorder* traffic_recorder, | 
| bool keystore_encryption_enabled, | 
| +                     bool client_enabled_pre_commit_update_avoidance, | 
| const std::string& invalidator_client_id); | 
|  | 
| ~SyncSessionContext(); | 
| @@ -129,6 +130,15 @@ class SYNC_EXPORT_PRIVATE SyncSessionContext { | 
| return invalidator_client_id_; | 
| } | 
|  | 
| +  bool ShouldFetchUpdatesBeforeCommit() const { | 
| +    return !(server_enabled_pre_commit_update_avoidance_ || | 
| +             client_enabled_pre_commit_update_avoidance_); | 
| +  } | 
| + | 
| +  void set_server_enabled_pre_commit_update_avoidance(bool value) { | 
| +    server_enabled_pre_commit_update_avoidance_ = value; | 
| +  } | 
| + | 
| private: | 
| // Rather than force clients to set and null-out various context members, we | 
| // extend our encapsulation boundary to scoped helpers that take care of this | 
| @@ -181,6 +191,15 @@ class SYNC_EXPORT_PRIVATE SyncSessionContext { | 
| // prevent us from receiving notifications of changes we make ourselves. | 
| const std::string invalidator_client_id_; | 
|  | 
| +  // Flag to enable or disable the no pre-commit GetUpdates experiment.  When | 
| +  // this flag is set to false, the syncer has the option of not performing at | 
| +  // GetUpdates request when there is nothing to fetch. | 
| +  bool server_enabled_pre_commit_update_avoidance_; | 
| + | 
| +  // If true, indicates that we've been passed a command-line flag to force | 
| +  // enable the pre-commit update avoidance experiment described above. | 
| +  const bool client_enabled_pre_commit_update_avoidance_; | 
| + | 
| DISALLOW_COPY_AND_ASSIGN(SyncSessionContext); | 
| }; | 
|  | 
|  |