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

Side by Side Diff: chrome/browser/media_galleries/fileapi/picasa_data_provider.cc

Issue 93263002: Move some more file utils to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/download/download_prefs.cc ('k') | chrome/browser/net/net_log_temp_file.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/media_galleries/fileapi/picasa_data_provider.h" 5 #include "chrome/browser/media_galleries/fileapi/picasa_data_provider.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 void PicasaDataProvider::OnTempDirWatchStarted( 129 void PicasaDataProvider::OnTempDirWatchStarted(
130 scoped_ptr<base::FilePathWatcher> temp_dir_watcher) { 130 scoped_ptr<base::FilePathWatcher> temp_dir_watcher) {
131 DCHECK(MediaFileSystemBackend::CurrentlyOnMediaTaskRunnerThread()); 131 DCHECK(MediaFileSystemBackend::CurrentlyOnMediaTaskRunnerThread());
132 temp_dir_watcher_.reset(temp_dir_watcher.release()); 132 temp_dir_watcher_.reset(temp_dir_watcher.release());
133 } 133 }
134 134
135 void PicasaDataProvider::OnTempDirChanged(const base::FilePath& temp_dir_path, 135 void PicasaDataProvider::OnTempDirChanged(const base::FilePath& temp_dir_path,
136 bool error) { 136 bool error) {
137 DCHECK(MediaFileSystemBackend::CurrentlyOnMediaTaskRunnerThread()); 137 DCHECK(MediaFileSystemBackend::CurrentlyOnMediaTaskRunnerThread());
138 if (file_util::IsDirectoryEmpty(temp_dir_path)) 138 if (base::IsDirectoryEmpty(temp_dir_path))
139 InvalidateData(); 139 InvalidateData();
140 } 140 }
141 141
142 void PicasaDataProvider::DoRefreshIfNecessary() { 142 void PicasaDataProvider::DoRefreshIfNecessary() {
143 DCHECK(state_ != INVALID_DATA_STATE); 143 DCHECK(state_ != INVALID_DATA_STATE);
144 DCHECK(state_ != ALBUMS_IMAGES_FRESH_STATE); 144 DCHECK(state_ != ALBUMS_IMAGES_FRESH_STATE);
145 DCHECK(!(album_table_reader_ && albums_indexer_)); 145 DCHECK(!(album_table_reader_ && albums_indexer_));
146 146
147 if (album_list_ready_callbacks_.empty() && 147 if (album_list_ready_callbacks_.empty() &&
148 albums_index_ready_callbacks_.empty()) { 148 albums_index_ready_callbacks_.empty()) {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 if (total_counts[name] != 1) { 258 if (total_counts[name] != 1) {
259 name = base::StringPrintf("%s (%d)", name.c_str(), 259 name = base::StringPrintf("%s (%d)", name.c_str(),
260 ++current_counts[name]); 260 ++current_counts[name]);
261 } 261 }
262 262
263 result_map->insert(std::pair<std::string, AlbumInfo>(name, info_list[i])); 263 result_map->insert(std::pair<std::string, AlbumInfo>(name, info_list[i]));
264 } 264 }
265 } 265 }
266 266
267 } // namespace picasa 267 } // namespace picasa
OLDNEW
« no previous file with comments | « chrome/browser/download/download_prefs.cc ('k') | chrome/browser/net/net_log_temp_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698