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

Unified Diff: chrome/browser/chromeos/gdata/drive_api_operations.cc

Issue 10920091: Move Drive API files to google_apis directory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reflect comments Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/gdata/drive_api_operations.cc
diff --git a/chrome/browser/chromeos/gdata/drive_api_operations.cc b/chrome/browser/chromeos/gdata/drive_api_operations.cc
deleted file mode 100644
index a12bfeed213b31cee89f3a42c9239bb9a61441c6..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/gdata/drive_api_operations.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/chromeos/gdata/drive_api_operations.h"
-
-#include "base/string_number_conversions.h"
-#include "base/stringprintf.h"
-#include "chrome/common/net/url_util.h"
-
-namespace {
-
-const char kDriveV2AboutURL[] = "https://www.googleapis.com/drive/v2/about";
-const char kDriveV2ApplistURL[] = "https://www.googleapis.com/drive/v2/apps";
-const char kDriveV2ChangelistURL[] =
- "https://www.googleapis.com/drive/v2/changes";
-
-const char kDriveV2FilelistURL[] = "https://www.googleapis.com/drive/v2/files";
-const char kDriveV2FileURLFormat[] =
- "https://www.googleapis.com/drive/v2/files/%s";
-
-} // namespace
-
-// TODO(kochi): Rename to namespace drive. http://crbug.com/136371
-namespace gdata {
-
-//============================== GetAboutOperation =============================
-
-GetAboutOperation::GetAboutOperation(OperationRegistry* registry,
- const GetDataCallback& callback)
- : GetDataOperation(registry, callback) {}
-
-GetAboutOperation::~GetAboutOperation() {}
-
-GURL GetAboutOperation::GetURL() const {
- return GURL(kDriveV2AboutURL);
-}
-
-//============================== GetApplistOperation ===========================
-
-GetApplistOperation::GetApplistOperation(OperationRegistry* registry,
- const GetDataCallback& callback)
- : GetDataOperation(registry, callback) {}
-
-GetApplistOperation::~GetApplistOperation() {}
-
-GURL GetApplistOperation::GetURL() const {
- return GURL(kDriveV2ApplistURL);
-}
-
-//============================ GetChangelistOperation ==========================
-
-GetChangelistOperation::GetChangelistOperation(
- OperationRegistry* registry,
- const GURL& url,
- int64 start_changestamp,
- const GetDataCallback& callback)
- : GetDataOperation(registry, callback),
- url_(kDriveV2ChangelistURL),
- start_changestamp_(start_changestamp) {
- if (!url.is_empty())
- url_ = url;
-}
-
-GetChangelistOperation::~GetChangelistOperation() {}
-
-GURL GetChangelistOperation::GetURL() const {
- if (start_changestamp_)
- return chrome_common_net::AppendOrReplaceQueryParameter(
- url_, "startChangeId", base::Int64ToString(start_changestamp_));
- return url_;
-}
-
-//============================= GetFlielistOperation ===========================
-
-GetFilelistOperation::GetFilelistOperation(
- OperationRegistry* registry,
- const GURL& url,
- const std::string& search_string,
- const GetDataCallback& callback)
- : GetDataOperation(registry, callback),
- url_(kDriveV2FilelistURL),
- search_string_(search_string) {
- if (!url.is_empty())
- url_ = url;
-}
-
-GetFilelistOperation::~GetFilelistOperation() {}
-
-GURL GetFilelistOperation::GetURL() const {
- if (!search_string_.empty()) {
- return chrome_common_net::AppendOrReplaceQueryParameter(
- url_, "q", search_string_);
- }
- return url_;
-}
-
-//=============================== GetFlieOperation =============================
-
-GetFileOperation::GetFileOperation(
- OperationRegistry* registry,
- const std::string& file_id,
- const GetDataCallback& callback)
- : GetDataOperation(registry, callback),
- file_id_(file_id) {}
-
-GetFileOperation::~GetFileOperation() {}
-
-GURL GetFileOperation::GetURL() const {
- return GURL(base::StringPrintf(kDriveV2FileURLFormat, file_id_.c_str()));
-}
-
-} // namespace gdata
« no previous file with comments | « chrome/browser/chromeos/gdata/drive_api_operations.h ('k') | chrome/browser/chromeos/gdata/drive_api_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698