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

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: Fix comments 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
« no previous file with comments | « no previous file | chrome/browser/profiles/profile.h » ('j') | 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) 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 4269 matching lines...) Expand 10 before | Expand all | Expand 10 after
4280 AutomationJSONReply reply(this, reply_message); 4280 AutomationJSONReply reply(this, reply_message);
4281 std::string username; 4281 std::string username;
4282 std::string password; 4282 std::string password;
4283 if (!args->GetString("username", &username) || 4283 if (!args->GetString("username", &username) ||
4284 !args->GetString("password", &password)) { 4284 !args->GetString("password", &password)) {
4285 reply.SendError("Invalid or missing args"); 4285 reply.SendError("Invalid or missing args");
4286 return; 4286 return;
4287 } 4287 }
4288 if (sync_waiter_.get() == NULL) { 4288 if (sync_waiter_.get() == NULL) {
4289 sync_waiter_.reset(new ProfileSyncServiceHarness( 4289 sync_waiter_.reset(new ProfileSyncServiceHarness(
4290 browser->profile(), username, password, 0)); 4290 browser->profile(), username, password));
4291 } else { 4291 } else {
4292 sync_waiter_->SetCredentials(username, password); 4292 sync_waiter_->SetCredentials(username, password);
4293 } 4293 }
4294 if (sync_waiter_->SetupSync()) { 4294 if (sync_waiter_->SetupSync()) {
4295 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); 4295 scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
4296 return_value->SetBoolean("success", true); 4296 return_value->SetBoolean("success", true);
4297 reply.SendSuccess(return_value.get()); 4297 reply.SendSuccess(return_value.get());
4298 } else { 4298 } else {
4299 reply.SendError("Signing in to sync was unsuccessful"); 4299 reply.SendError("Signing in to sync was unsuccessful");
4300 } 4300 }
(...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after
5871 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); 5871 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl);
5872 5872
5873 Send(reply_message_); 5873 Send(reply_message_);
5874 redirect_query_ = 0; 5874 redirect_query_ = 0;
5875 reply_message_ = NULL; 5875 reply_message_ = NULL;
5876 } 5876 }
5877 5877
5878 void TestingAutomationProvider::OnRemoveProvider() { 5878 void TestingAutomationProvider::OnRemoveProvider() {
5879 AutomationProviderList::GetInstance()->RemoveProvider(this); 5879 AutomationProviderList::GetInstance()->RemoveProvider(this);
5880 } 5880 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698