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

Unified Diff: chrome/browser/sync/util/get_session_name_task.h

Issue 9565050: [Sync] Simplify GetSessionName interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win compile failure Created 8 years, 10 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
« no previous file with comments | « chrome/browser/sync/util/get_session_name_mac.mm ('k') | chrome/browser/sync/util/get_session_name_task.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/util/get_session_name_task.h
diff --git a/chrome/browser/sync/util/get_session_name_task.h b/chrome/browser/sync/util/get_session_name_task.h
deleted file mode 100644
index bdfa4796232830a8353ddaf33ff85ff5bda26895..0000000000000000000000000000000000000000
--- a/chrome/browser/sync/util/get_session_name_task.h
+++ /dev/null
@@ -1,62 +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.
-
-#ifndef CHROME_BROWSER_SYNC_UTIL_GET_SESSION_NAME_TASK_H_
-#define CHROME_BROWSER_SYNC_UTIL_GET_SESSION_NAME_TASK_H_
-#pragma once
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/callback.h"
-#include "base/gtest_prod_util.h"
-#include "base/memory/ref_counted.h"
-
-namespace base {
-class MessageLoopProxy;
-} // namespace base
-
-namespace browser_sync {
-
-class GetSessionNameTask
- : public base::RefCountedThreadSafe<GetSessionNameTask> {
- public:
- typedef base::Callback<void(const std::string& name)>
- OnSessionNameInitialized;
-
- explicit GetSessionNameTask(const OnSessionNameInitialized& callback);
- virtual ~GetSessionNameTask();
-
- void GetSessionNameAsync();
-
- private:
- friend class base::RefCountedThreadSafe<GetSessionNameTask>;
-
- FRIEND_TEST_ALL_PREFIXES(SyncGetSessionNameTaskTest, GetHardwareModelName);
- FRIEND_TEST_ALL_PREFIXES(SyncGetSessionNameTaskTest, GetComputerName);
-
- void InvokeCallback(const std::string& session_name);
-
-#if defined(OS_MACOSX)
- // Returns the Hardware model name, without trailing numbers, if possible.
- // See http://www.cocoadev.com/index.pl?MacintoshModels for an example list of
- // models. If an error occurs trying to read the model, this simply returns
- // "Unknown".
- static std::string GetHardwareModelName();
-#endif
-
-#if defined(OS_WIN)
- // Returns the computer name or the empty string if an error occured.
- static std::string GetComputerName();
-#endif
-
- const OnSessionNameInitialized callback_;
- const scoped_refptr<base::MessageLoopProxy> thread_;
-
- DISALLOW_COPY_AND_ASSIGN(GetSessionNameTask);
-};
-
-} // namespace browser_sync
-
-#endif // CHROME_BROWSER_SYNC_UTIL_GET_SESSION_NAME_TASK_H__
« no previous file with comments | « chrome/browser/sync/util/get_session_name_mac.mm ('k') | chrome/browser/sync/util/get_session_name_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698