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

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

Issue 10198003: gdata: Get rid of GetGDataCacheTmpDirectory() and friends (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 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/chromeos/gdata/gdata_files.h" 5 #include "chrome/browser/chromeos/gdata/gdata_files.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 20 matching lines...) Expand all
31 switch (subdir) { 31 switch (subdir) {
32 case gdata::GDataRootDirectory::CACHE_TYPE_META: return "meta"; 32 case gdata::GDataRootDirectory::CACHE_TYPE_META: return "meta";
33 case gdata::GDataRootDirectory::CACHE_TYPE_PINNED: return "pinned"; 33 case gdata::GDataRootDirectory::CACHE_TYPE_PINNED: return "pinned";
34 case gdata::GDataRootDirectory::CACHE_TYPE_OUTGOING: return "outgoing"; 34 case gdata::GDataRootDirectory::CACHE_TYPE_OUTGOING: return "outgoing";
35 case gdata::GDataRootDirectory::CACHE_TYPE_PERSISTENT: return "persistent"; 35 case gdata::GDataRootDirectory::CACHE_TYPE_PERSISTENT: return "persistent";
36 case gdata::GDataRootDirectory::CACHE_TYPE_TMP: return "tmp"; 36 case gdata::GDataRootDirectory::CACHE_TYPE_TMP: return "tmp";
37 case gdata::GDataRootDirectory::CACHE_TYPE_TMP_DOWNLOADS: 37 case gdata::GDataRootDirectory::CACHE_TYPE_TMP_DOWNLOADS:
38 return "tmp_downloads"; 38 return "tmp_downloads";
39 case gdata::GDataRootDirectory::CACHE_TYPE_TMP_DOCUMENTS: 39 case gdata::GDataRootDirectory::CACHE_TYPE_TMP_DOCUMENTS:
40 return "tmp_documents"; 40 return "tmp_documents";
41 case gdata::GDataRootDirectory::NUM_CACHE_TYPES:
42 NOTREACHED();
41 } 43 }
42 NOTREACHED(); 44 NOTREACHED();
43 return "unknown subdir"; 45 return "unknown subdir";
44 } 46 }
45 47
46 // Extracts resource_id out of edit url. 48 // Extracts resource_id out of edit url.
47 std::string ExtractResourceId(const GURL& url) { 49 std::string ExtractResourceId(const GURL& url) {
48 return net::UnescapeURLComponent(url.ExtractFileName(), 50 return net::UnescapeURLComponent(url.ExtractFileName(),
49 net::UnescapeRule::URL_SPECIAL_CHARS); 51 net::UnescapeRule::URL_SPECIAL_CHARS);
50 } 52 }
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 bool ok = proto->ParseFromString(proto_string); 668 bool ok = proto->ParseFromString(proto_string);
667 if (ok) { 669 if (ok) {
668 FromProto(*proto.get()); 670 FromProto(*proto.get());
669 set_origin(FROM_CACHE); 671 set_origin(FROM_CACHE);
670 set_refresh_time(base::Time::Now()); 672 set_refresh_time(base::Time::Now());
671 } 673 }
672 return ok; 674 return ok;
673 } 675 }
674 676
675 } // namespace gdata 677 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_files.h ('k') | chrome/browser/chromeos/gdata/gdata_sync_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698