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

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

Issue 10704124: Fix style nits in gdata directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 | « chrome/browser/chromeos/gdata/gdata_operations.cc ('k') | 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/gdata_parser.h" 5 #include "chrome/browser/chromeos/gdata/gdata_parser.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 bool Link::GetAppID(const base::StringPiece& rel, std::string* app_id) { 305 bool Link::GetAppID(const base::StringPiece& rel, std::string* app_id) {
306 DCHECK(app_id); 306 DCHECK(app_id);
307 // Fast return path if the link clearly isn't an OPEN_WITH link. 307 // Fast return path if the link clearly isn't an OPEN_WITH link.
308 if (rel.size() < kOpenWithPrefixSize) { 308 if (rel.size() < kOpenWithPrefixSize) {
309 app_id->clear(); 309 app_id->clear();
310 return true; 310 return true;
311 } 311 }
312 312
313 const std::string kOpenWithPrefixStr(kOpenWithPrefix); 313 const std::string kOpenWithPrefixStr(kOpenWithPrefix);
314 if (StartsWithASCII(rel.as_string(), kOpenWithPrefixStr, false)) { 314 if (StartsWithASCII(rel.as_string(), kOpenWithPrefixStr, false)) {
315 *app_id = rel.as_string().substr(kOpenWithPrefixStr.size()); 315 *app_id = rel.as_string().substr(kOpenWithPrefixStr.size());
316 return true; 316 return true;
317 } 317 }
318 318
319 app_id->clear(); 319 app_id->clear();
320 return true; 320 return true;
321 } 321 }
322 322
323 // static. 323 // static.
324 bool Link::GetLinkType(const base::StringPiece& rel, Link::LinkType* type) { 324 bool Link::GetLinkType(const base::StringPiece& rel, Link::LinkType* type) {
325 DCHECK(type); 325 DCHECK(type);
326 for (size_t i = 0; i < arraysize(kLinkTypeMap); i++) { 326 for (size_t i = 0; i < arraysize(kLinkTypeMap); i++) {
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 bool AccountMetadataFeed::Parse(const base::Value& value) { 1047 bool AccountMetadataFeed::Parse(const base::Value& value) {
1048 base::JSONValueConverter<AccountMetadataFeed> converter; 1048 base::JSONValueConverter<AccountMetadataFeed> converter;
1049 if (!converter.Convert(value, this)) { 1049 if (!converter.Convert(value, this)) {
1050 LOG(ERROR) << "Unable to parse: Invalid account metadata feed!"; 1050 LOG(ERROR) << "Unable to parse: Invalid account metadata feed!";
1051 return false; 1051 return false;
1052 } 1052 }
1053 return true; 1053 return true;
1054 } 1054 }
1055 1055
1056 } // namespace gdata 1056 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_operations.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698