OLD | NEW |
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/extensions/file_browser_private_api.h" | 5 #include "chrome/browser/chromeos/extensions/file_browser_private_api.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2121 else if (active_network->type() == chromeos::TYPE_CELLULAR) | 2121 else if (active_network->type() == chromeos::TYPE_CELLULAR) |
2122 type_string = "cellular"; | 2122 type_string = "cellular"; |
2123 else | 2123 else |
2124 type_string = "ethernet"; // Currently we do not care about other types. | 2124 type_string = "ethernet"; // Currently we do not care about other types. |
2125 | 2125 |
2126 value->SetString("type", type_string); | 2126 value->SetString("type", type_string); |
2127 result_.reset(value.release()); | 2127 result_.reset(value.release()); |
2128 | 2128 |
2129 return true; | 2129 return true; |
2130 } | 2130 } |
2131 | |
2132 bool RequestDirectoryRefreshFunction::RunImpl() { | |
2133 std::string file_url_as_string; | |
2134 if (!args_->GetString(0, &file_url_as_string)) | |
2135 return false; | |
2136 | |
2137 gdata::GDataSystemService* system_service = | |
2138 gdata::GDataSystemServiceFactory::GetForProfile(profile_); | |
2139 if (!system_service || !system_service->file_system()) | |
2140 return false; | |
2141 | |
2142 FilePath directory_path = GetVirtualPathFromURL(GURL(file_url_as_string)); | |
2143 system_service->file_system()->RequestDirectoryRefresh(directory_path); | |
2144 | |
2145 return true; | |
2146 } | |
OLD | NEW |