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

Side by Side Diff: chrome/browser/chromeos/gdata/operations_base.cc

Issue 10834120: Drive: Add ALLOW_THIS_IN_INITIALIZER_LIST in operations_base.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | no next file » | 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) 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/chromeos/gdata/operations_base.h" 5 #include "chrome/browser/chromeos/gdata/operations_base.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 callback_.Run(code, document_url_); 359 callback_.Run(code, document_url_);
360 } 360 }
361 361
362 //============================== GetDataOperation ============================== 362 //============================== GetDataOperation ==============================
363 363
364 GetDataOperation::GetDataOperation(GDataOperationRegistry* registry, 364 GetDataOperation::GetDataOperation(GDataOperationRegistry* registry,
365 Profile* profile, 365 Profile* profile,
366 const GetDataCallback& callback) 366 const GetDataCallback& callback)
367 : UrlFetchOperationBase(registry, profile), 367 : UrlFetchOperationBase(registry, profile),
368 callback_(callback), 368 callback_(callback),
369 weak_ptr_factory_(this) { 369 ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) {
370 } 370 }
371 371
372 GetDataOperation::~GetDataOperation() {} 372 GetDataOperation::~GetDataOperation() {}
373 373
374 void GetDataOperation::ProcessURLFetchResults(const URLFetcher* source) { 374 void GetDataOperation::ProcessURLFetchResults(const URLFetcher* source) {
375 std::string data; 375 std::string data;
376 source->GetResponseAsString(&data); 376 source->GetResponseAsString(&data);
377 scoped_ptr<base::Value> root_value; 377 scoped_ptr<base::Value> root_value;
378 GDataErrorCode fetch_error_code = GetErrorCode(source); 378 GDataErrorCode fetch_error_code = GetErrorCode(source);
379 379
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 } 440 }
441 441
442 void GetDataOperation::RunCallback(GDataErrorCode fetch_error_code, 442 void GetDataOperation::RunCallback(GDataErrorCode fetch_error_code,
443 scoped_ptr<base::Value> value) { 443 scoped_ptr<base::Value> value) {
444 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 444 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
445 if (!callback_.is_null()) 445 if (!callback_.is_null())
446 callback_.Run(fetch_error_code, value.Pass()); 446 callback_.Run(fetch_error_code, value.Pass());
447 } 447 }
448 448
449 } // namespace gdata 449 } // namespace gdata
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698