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

Side by Side Diff: chrome/browser/sync_file_system/drive_file_sync_client.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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) 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_file_system/drive_file_sync_client.h" 5 #include "chrome/browser/sync_file_system/drive_file_sync_client.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <sstream> 9 #include <sstream>
10 #include <string> 10 #include <string>
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 } // namespace 123 } // namespace
124 124
125 DriveFileSyncClient::DriveFileSyncClient(Profile* profile) 125 DriveFileSyncClient::DriveFileSyncClient(Profile* profile)
126 : url_generator_(GURL( 126 : url_generator_(GURL(
127 google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction)), 127 google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction)),
128 upload_next_key_(0) { 128 upload_next_key_(0) {
129 drive_service_.reset(new google_apis::GDataWapiService( 129 drive_service_.reset(new google_apis::GDataWapiService(
130 profile->GetRequestContext(), 130 profile->GetRequestContext(),
131 GURL(google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction), 131 GURL(google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction),
132 "" /* custom_user_agent */)); 132 std::string() /* custom_user_agent */));
133 drive_service_->Initialize(profile); 133 drive_service_->Initialize(profile);
134 drive_service_->AddObserver(this); 134 drive_service_->AddObserver(this);
135 net::NetworkChangeNotifier::AddConnectionTypeObserver(this); 135 net::NetworkChangeNotifier::AddConnectionTypeObserver(this);
136 136
137 drive_uploader_.reset(new google_apis::DriveUploader(drive_service_.get())); 137 drive_uploader_.reset(new google_apis::DriveUploader(drive_service_.get()));
138 } 138 }
139 139
140 scoped_ptr<DriveFileSyncClient> DriveFileSyncClient::CreateForTesting( 140 scoped_ptr<DriveFileSyncClient> DriveFileSyncClient::CreateForTesting(
141 Profile* profile, 141 Profile* profile,
142 const GURL& base_url, 142 const GURL& base_url,
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 return; 958 return;
959 for (UploadCallbackMap::iterator iter = upload_callback_map_.begin(); 959 for (UploadCallbackMap::iterator iter = upload_callback_map_.begin();
960 iter != upload_callback_map_.end(); ++iter) { 960 iter != upload_callback_map_.end(); ++iter) {
961 iter->second.Run(error, std::string(), std::string()); 961 iter->second.Run(error, std::string(), std::string());
962 } 962 }
963 upload_callback_map_.clear(); 963 upload_callback_map_.clear();
964 drive_uploader_.reset(new google_apis::DriveUploader(drive_service_.get())); 964 drive_uploader_.reset(new google_apis::DriveUploader(drive_service_.get()));
965 } 965 }
966 966
967 } // namespace sync_file_system 967 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698