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

Side by Side Diff: chrome/browser/ui/webui/options/sync_setup_handler_unittest.cc

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 5 years, 7 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 (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/ui/webui/options/sync_setup_handler.h" 5 #include "chrome/browser/ui/webui/options/sync_setup_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 result.SetBoolean("bookmarksSynced", types.Has(syncer::BOOKMARKS)); 86 result.SetBoolean("bookmarksSynced", types.Has(syncer::BOOKMARKS));
87 result.SetBoolean("extensionsSynced", types.Has(syncer::EXTENSIONS)); 87 result.SetBoolean("extensionsSynced", types.Has(syncer::EXTENSIONS));
88 result.SetBoolean("passwordsSynced", types.Has(syncer::PASSWORDS)); 88 result.SetBoolean("passwordsSynced", types.Has(syncer::PASSWORDS));
89 result.SetBoolean("preferencesSynced", types.Has(syncer::PREFERENCES)); 89 result.SetBoolean("preferencesSynced", types.Has(syncer::PREFERENCES));
90 result.SetBoolean("tabsSynced", types.Has(syncer::PROXY_TABS)); 90 result.SetBoolean("tabsSynced", types.Has(syncer::PROXY_TABS));
91 result.SetBoolean("themesSynced", types.Has(syncer::THEMES)); 91 result.SetBoolean("themesSynced", types.Has(syncer::THEMES));
92 result.SetBoolean("typedUrlsSynced", types.Has(syncer::TYPED_URLS)); 92 result.SetBoolean("typedUrlsSynced", types.Has(syncer::TYPED_URLS));
93 result.SetBoolean("wifiCredentialsSynced", 93 result.SetBoolean("wifiCredentialsSynced",
94 types.Has(syncer::WIFI_CREDENTIALS)); 94 types.Has(syncer::WIFI_CREDENTIALS));
95 std::string args; 95 std::string args;
96 base::JSONWriter::Write(&result, &args); 96 base::JSONWriter::Write(result, &args);
97 return args; 97 return args;
98 } 98 }
99 99
100 // Checks whether the passed |dictionary| contains a |key| with the given 100 // Checks whether the passed |dictionary| contains a |key| with the given
101 // |expected_value|. If |omit_if_false| is true, then the value should only 101 // |expected_value|. If |omit_if_false| is true, then the value should only
102 // be present if |expected_value| is true. 102 // be present if |expected_value| is true.
103 void CheckBool(const base::DictionaryValue* dictionary, 103 void CheckBool(const base::DictionaryValue* dictionary,
104 const std::string& key, 104 const std::string& key,
105 bool expected_value, 105 bool expected_value,
106 bool omit_if_false) { 106 bool omit_if_false) {
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 WillRepeatedly(Return(false)); 1084 WillRepeatedly(Return(false));
1085 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0); 1085 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0);
1086 EXPECT_CALL(*mock_pss_, OnUserChoseDatatypes(true, _)); 1086 EXPECT_CALL(*mock_pss_, OnUserChoseDatatypes(true, _));
1087 handler_->HandleConfigure(&list_args); 1087 handler_->HandleConfigure(&list_args);
1088 1088
1089 // Ensure that we navigated to the "done" state since we don't need a 1089 // Ensure that we navigated to the "done" state since we don't need a
1090 // passphrase. 1090 // passphrase.
1091 ExpectDone(); 1091 ExpectDone();
1092 } 1092 }
1093 1093
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/preferences_browsertest.cc ('k') | chrome/browser/ui/webui/policy_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698