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

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 7024058: [Sync] Clean up sync logging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: even more logging Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 4264 matching lines...) Expand 10 before | Expand all | Expand 10 after
4275 AutomationJSONReply reply(this, reply_message); 4275 AutomationJSONReply reply(this, reply_message);
4276 std::string username; 4276 std::string username;
4277 std::string password; 4277 std::string password;
4278 if (!args->GetString("username", &username) || 4278 if (!args->GetString("username", &username) ||
4279 !args->GetString("password", &password)) { 4279 !args->GetString("password", &password)) {
4280 reply.SendError("Invalid or missing args"); 4280 reply.SendError("Invalid or missing args");
4281 return; 4281 return;
4282 } 4282 }
4283 if (sync_waiter_.get() == NULL) { 4283 if (sync_waiter_.get() == NULL) {
4284 sync_waiter_.reset(new ProfileSyncServiceHarness( 4284 sync_waiter_.reset(new ProfileSyncServiceHarness(
4285 browser->profile(), username, password, 0)); 4285 browser->profile(), username, password));
4286 } else { 4286 } else {
4287 sync_waiter_->SetCredentials(username, password); 4287 sync_waiter_->SetCredentials(username, password);
4288 } 4288 }
4289 if (sync_waiter_->SetupSync()) { 4289 if (sync_waiter_->SetupSync()) {
4290 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); 4290 scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
4291 return_value->SetBoolean("success", true); 4291 return_value->SetBoolean("success", true);
4292 reply.SendSuccess(return_value.get()); 4292 reply.SendSuccess(return_value.get());
4293 } else { 4293 } else {
4294 reply.SendError("Signing in to sync was unsuccessful"); 4294 reply.SendError("Signing in to sync was unsuccessful");
4295 } 4295 }
(...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after
5866 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); 5866 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl);
5867 5867
5868 Send(reply_message_); 5868 Send(reply_message_);
5869 redirect_query_ = 0; 5869 redirect_query_ = 0;
5870 reply_message_ = NULL; 5870 reply_message_ = NULL;
5871 } 5871 }
5872 5872
5873 void TestingAutomationProvider::OnRemoveProvider() { 5873 void TestingAutomationProvider::OnRemoveProvider() {
5874 AutomationProviderList::GetInstance()->RemoveProvider(this); 5874 AutomationProviderList::GetInstance()->RemoveProvider(this);
5875 } 5875 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile.h » ('j') | chrome/browser/sync/engine/syncer_thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698